id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
20473418_25
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testDescendingOverflowCycle() throws SQLException {\n \tassertTrue(SequenceUtil.checkIfLimitReached(Long.MIN_VALUE, Long.MIN_VALUE, 0, -1/* incrementBy */, CACHE_SIZE));\n }", "class_method_signature": "SequenceUtilTest.testDescendingOverflowCycle()", "constructor": false, ...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_126
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(TestIndexWriter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(TestIndexWriter.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Test\n public void getDefaultWriter() throws Exception {\n Configuration conf = new Configuration(false);\n RegionCoprocessorEnvironment env = Mockito.mock(RegionCoprocessorEnvironment.class);\n Mockito.when(env.getConfiguration()).thenReturn(conf);\n assertNotNull(IndexWriter.getCommitter(en...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(IndexWriter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(IndexWriter.class);", "type": "Logger", "var_name": "LOGGER" }, { "d...
{ "body": "public static IndexCommitter getCommitter(RegionCoprocessorEnvironment env) throws IOException {\n return getCommitter(env,TrackingParallelWriterIndexCommitter.class);\n }", "class_method_signature": "IndexWriter.getCommitter(RegionCoprocessorEnvironment env)", "constructor": false, "full_signa...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_33
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testBulkAllocationDescendingOverflowCycle() throws SQLException {\n assertTrue(SequenceUtil.checkIfLimitReached(Long.MIN_VALUE, Long.MIN_VALUE, 0, -1/* incrementBy */, CACHE_SIZE, 100));\n }", "class_method_signature": "SequenceUtilTest.testBulkAllocationDescendingOverflo...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_171
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/ValueBitSetTest.java", "identifier": "ValueBitSetTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMinNullableIndex() {\n final int minNullableIndex = 4; // first 4 fields are not nullable.\n int numFields = 6;\n KeyValueSchemaBuilder builder = new KeyValueSchemaBuilder(minNullableIndex);\n for (int i = 0; i < numFields; i++) {\n final in...
{ "fields": [ { "declarator": "EMPTY_VALUE_BITSET = new ValueBitSet()", "modifier": "public final static", "original_string": "public final static ValueBitSet EMPTY_VALUE_BITSET = new ValueBitSet();", "type": "ValueBitSet", "var_name": "EMPTY_VALUE_BITSET" }, { "declara...
{ "body": "public boolean get(int nBit) {\n int lIndex = nBit / BITS_PER_LONG;\n int bIndex = nBit % BITS_PER_LONG;\n return (bits[lIndex] & (1L << bIndex)) != 0;\n }", "class_method_signature": "ValueBitSet.get(int nBit)", "constructor": false, "full_signature": "public boolean get(int ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_64
{ "fields": [ { "declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)", "modifier": "private static final", "original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);", "type": "ColumnInfo", "var_name": "ID_COLUMN" }, { ...
{ "body": "@Test\n public void testConstructParameterizedInClause() {\n assertEquals(\"((?,?,?),(?,?,?))\", QueryUtil.constructParameterizedInClause(3, 2));\n assertEquals(\"((?))\", QueryUtil.constructParameterizedInClause(1, 1));\n }", "class_method_signature": "QueryUtilTest.testConstructPara...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "public static String constructParameterizedInClause(int numWhereCols, int numBatches) {\n Preconditions.checkArgument(numWhereCols > 0);\n Preconditions.checkArgument(numBatches > 0);\n String batch = \"(\" + StringUtils.repeat(\"?\", \",\", numWhereCols) + \")\";\n return \"(\"...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_106
{ "fields": [ { "declarator": "PHOENIX_IO_EXCEPTION =\n new PhoenixIOException(new Exception(\"Test exception\"))", "modifier": "private static final", "original_string": "private static final PhoenixIOException PHOENIX_IO_EXCEPTION =\n new PhoenixIOException(new Exception(...
{ "body": "@Test\n public void testSysMutexCheckReturnsFalseWhenTableAbsent() throws Exception {\n // Override the getDescriptor() call to throw instead\n doThrow(new TableNotFoundException())\n .when(mockAdmin)\n .getDescriptor(TableName.valueOf(SYSTEM_MUTEX_NAME));\n ...
{ "fields": [ { "declarator": "LOGGER =\n LoggerFactory.getLogger(ConnectionQueryServicesImpl.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER =\n LoggerFactory.getLogger(ConnectionQueryServicesImpl.class);", "type": ...
{ "body": "@VisibleForTesting\n boolean checkIfSysMutexExistsAndModifyTTLIfRequired(Admin admin) throws IOException {\n TableDescriptor htd;\n try {\n htd = admin.getDescriptor(TableName.valueOf(SYSTEM_MUTEX_NAME));\n } catch (org.apache.hadoop.hbase.TableNotFoundException ignored) ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_13
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/ColumnInfoTest.java", "identifier": "ColumnInfoTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOptionalDescriptionType() {\n testType(new ColumnInfo(\"a.myColumn\", Types.CHAR), \"CHAR:\\\"a\\\".\\\"myColumn\\\"\");\n testType(new ColumnInfo(\"a.myColumn\", Types.CHAR, 100), \"CHAR(100):\\\"a\\\".\\\"myColumn\\\"\");\n testType(new ColumnInfo(\"a.myCol...
{ "fields": [ { "declarator": "STR_SEPARATOR = \":\"", "modifier": "private static final", "original_string": "private static final String STR_SEPARATOR = \":\";", "type": "String", "var_name": "STR_SEPARATOR" }, { "declarator": "columnName", "modifier": "private ...
{ "body": "public int getSqlType() {\n return sqlType;\n }", "class_method_signature": "ColumnInfo.getSqlType()", "constructor": false, "full_signature": "public int getSqlType()", "identifier": "getSqlType", "invocations": [], "modifiers": "public", "parameters": "()", "return": "int", "s...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_151
{ "fields": [ { "declarator": "SCRUTINY_TIME_MILLIS = 1502908914193L", "modifier": "private static final", "original_string": "private static final long SCRUTINY_TIME_MILLIS = 1502908914193L;", "type": "long", "var_name": "SCRUTINY_TIME_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testGetOutputTableUpsert() throws Exception {\n IndexColumnNames columnNames = new IndexColumnNames(pDataTable, pIndexTable);\n String outputTableUpsert =\n IndexScrutinyTableOutput.constructOutputTableUpsert(\n columnNames.getDynamicDataCols()...
{ "fields": [ { "declarator": "OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\"", "modifier": "public static", "original_string": "public static String OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\";", "type": "String", "var_name": "OUTPUT_TABLE_NAME" }, { "declarator": "...
{ "body": "public static String constructOutputTableUpsert(List<String> sourceDynamicCols,\n List<String> targetDynamicCols, Connection connection) throws SQLException {\n List<String> outputTableColumns = getOutputTableColumns(connection);\n\n // construct a dynamic column upsert into the ou...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_44
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java", "identifier": "JDBCUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAutoCommit_FalseInUrl() {\n assertFalse(JDBCUtil.getAutoCommit(\"localhost;AutoCommit=FaLse\", new Properties(), false));\n }", "class_method_signature": "JDBCUtilTest.testGetAutoCommit_FalseInUrl()", "constructor": false, "full_signature": "@Test public void t...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java", "identifier": "JDBCUtil", "interfaces": "", "methods": [ { "class_method_signature": "JDBCUtil.JDBCUtil()", "constructor": true, "full_signature": "private JDBCUtil()", "identifier": "JDBCU...
{ "body": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue) {\n String autoCommit = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);\n if (autoCommit == null) {\n return defaultValue;\n }\n return Boolean.valueOf(autoCommit);\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_52
{ "fields": [ { "declarator": "conn", "modifier": "private", "original_string": "private Connection conn;", "type": "Connection", "var_name": "conn" }, { "declarator": "converter", "modifier": "private", "original_string": "private StringToArrayConverter con...
{ "body": "@Test\n public void testToArray_SingleElement() throws SQLException {\n Array singleElementArray = converter.toArray(\"value\");\n assertArrayEquals(\n new Object[]{\"value\"},\n (Object[]) singleElementArray.getArray());\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "splitter", "modifier": "private final", "original_string": "private final Splitter splitter;", "type": "Splitter", "var_name": "splitter" }, { "declarator": "conn", "modifier": "private final", "original_string": "private final...
{ "body": "public Array toArray(String input) throws SQLException {\n if (input == null || input.isEmpty()) {\n return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]);\n }\n return conn.createArrayOf(\n elementDataType.getSqlTypeName(),\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_147
{ "fields": [ { "declarator": "SCRUTINY_TIME_MILLIS = 1502908914193L", "modifier": "private static final", "original_string": "private static final long SCRUTINY_TIME_MILLIS = 1502908914193L;", "type": "long", "var_name": "SCRUTINY_TIME_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testGetSqlQueryAllInvalidRows() throws SQLException {\n SourceTargetColumnNames columnNames =\n new SourceTargetColumnNames.DataSourceColNames(pDataTable, pIndexTable);\n String sqlStr =\n IndexScrutinyTableOutput.getSqlQueryAllInvalidRows(conn, co...
{ "fields": [ { "declarator": "OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\"", "modifier": "public static", "original_string": "public static String OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\";", "type": "String", "var_name": "OUTPUT_TABLE_NAME" }, { "declarator": "...
{ "body": "public static String getSqlQueryAllInvalidRows(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException {\n String paramQuery = getAllInvalidParamQuery(conn, columnNames);\n paramQuery = bindPkCols(columnNames, scrutinyTimeMillis, paramQu...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_110
{ "fields": [ { "declarator": "testCache = null", "modifier": "static", "original_string": "static GuidePostsCache testCache = null;", "type": "GuidePostsCache", "var_name": "testCache" }, { "declarator": "phoenixStatsLoader = null", "modifier": "static", "o...
{ "body": "@Test(expected = java.lang.NullPointerException.class)\n public void loadAndGetGuidePostsCacheFactoryNullStringFailure(){\n helper.loadAndGetGuidePostsCacheFactory(null);\n }", "class_method_signature": "GuidePostsCacheProviderTest.loadAndGetGuidePostsCacheFactoryNullStringFailure()", ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@VisibleForTesting\n GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString) {\n Preconditions.checkNotNull(classString);\n if (guidePostsCacheFactory == null) {\n try {\n\n Class clazz = Class.forName(classString);\n if (!GuideP...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_91
{ "fields": [ { "declarator": "ROW = Bytes.toBytes(\"row\")", "modifier": "private static final", "original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");", "type": "byte[]", "var_name": "ROW" }, { "declarator": "QUALIFIER = Bytes.toBytes(\"qual\")"...
{ "body": "@Test\n public void testSkipTaggingAPutDueToSameCellValue() throws Exception {\n Put put = generateOriginalPut();\n Cell initialCell = put.get(TABLE_FAMILY_BYTES, QUALIFIER).get(0);\n\n // valueArray is set as the value stored in the cell, so we skip tagging the cell\n MetaDa...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray) {\n NavigableMap<byte[], List<Cell>> familyCellMap = somePut.getFamilyCellMap();\n List<Cell> cells = familyCellMap...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_184
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/tuple/SingleKeyValueTupleTest.java", "identifier": "SingleKeyValueTupleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToString() {\n\n SingleKeyValueTuple singleKeyValueTuple = new SingleKeyValueTuple();\n assertTrue(singleKeyValueTuple.toString().equals(\"SingleKeyValueTuple[null]\"));\n final byte [] rowKey = Bytes.toBytes(\"aaa\");\n singleKeyValueTuple.setKey(new ...
{ "fields": [ { "declarator": "UNITIALIZED_KEY_BUFFER = new byte[0]", "modifier": "private static final", "original_string": "private static final byte[] UNITIALIZED_KEY_BUFFER = new byte[0];", "type": "byte[]", "var_name": "UNITIALIZED_KEY_BUFFER" }, { "declarator": "c...
{ "body": "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"SingleKeyValueTuple[\");\n if (cell == null) {\n if (rowKeyPtr.get() == UNITIALIZED_KEY_BUFFER) {\n sb.append(\"null\");\n } else {\n sb...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_29
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testBulkAllocationAscendingOverflow() throws SQLException {\n assertTrue(SequenceUtil.checkIfLimitReached(Long.MAX_VALUE, 0, Long.MAX_VALUE, 1/* incrementBy */, CACHE_SIZE, 100));\n }", "class_method_signature": "SequenceUtilTest.testBulkAllocationAscendingOverflow()", ...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_192
{ "fields": [ { "declarator": "CONSTANT_EXPRESSION = LiteralExpression.newConstant(QueryConstants.EMPTY_COLUMN_VALUE_BYTES)", "modifier": "protected static final", "original_string": "protected static final LiteralExpression CONSTANT_EXPRESSION = LiteralExpression.newConstant(QueryConstants.EMPT...
{ "body": "@Test\n public void testLeadingNulls() throws Exception {\n List<Expression> children = Lists.newArrayListWithExpectedSize(4);\n LiteralExpression nullExpression = LiteralExpression.newConstant(null);\n children.add(nullExpression);\n children.add(nullExpression);\n ch...
{ "fields": [ { "declarator": "baseType", "modifier": "private", "original_string": "private PDataType baseType;", "type": "PDataType", "var_name": "baseType" }, { "declarator": "position = -1", "modifier": "private", "original_string": "private int position...
{ "body": "@Override\n public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) {\n if (position == elements.length) {\n ptr.set(valuePtr.get(), valuePtr.getOffset(), valuePtr.getLength());\n return true;\n }\n TrustedByteArrayOutputStream byteStream = new Trusted...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_87
{ "fields": [ { "declarator": "ROW = Bytes.toBytes(\"row\")", "modifier": "private static final", "original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");", "type": "byte[]", "var_name": "ROW" }, { "declarator": "QUALIFIER = Bytes.toBytes(\"qual\")"...
{ "body": "@Test\n public void testDecode() {\n int encodedVersion = VersionUtil.encodeVersion(\"4.15.5\");\n assertEquals(VersionUtil.decodeMajorVersion(encodedVersion), 4);\n assertEquals(VersionUtil.decodeMinorVersion(encodedVersion), 15);\n assertEquals(VersionUtil.decodePatchVersio...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static long encodeVersion(String hbaseVersionStr, Configuration config) {\n long hbaseVersion = VersionUtil.encodeVersion(hbaseVersionStr);\n long isTableNamespaceMappingEnabled = SchemaUtil.isNamespaceMappingEnabled(PTableType.TABLE,\n new ReadOnlyProps(config.iterator(...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_68
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/ByteUtilTest.java", "identifier": "ByteUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testVIntToBytes() {\n for (int i = -10000; i <= 10000; i++) {\n byte[] vint = Bytes.vintToBytes(i);\n int vintSize = vint.length;\n byte[] vint2 = new byte[vint.length];\n assertEquals(vintSize, ByteUtil.vintToBytes(vint2, 0, i));\n ...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static final", "original_string": "public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_BYTE_ARRAY_PTR ...
{ "body": "public static int vintToBytes(byte[] result, int offset, final long vint) {\n long i = vint;\n if (i >= -112 && i <= 127) {\n result[offset] = (byte) i;\n return 1;\n }\n\n int len = -112;\n if (i < 0) {\n i ^= -1L; // take one's complement'\n len = -120...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_193
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/expression/InListExpressionTest.java", "identifier": "InListExpressionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHashCode() throws Exception {\n int valuesNumber = 500000;\n List<ImmutableBytesPtr> values = new ArrayList<>(valuesNumber);\n for (int i = 0; i < valuesNumber; i++) {\n values.add(new ImmutableBytesPtr(Bytes.toBytes(i)));\n }\n InLis...
{ "fields": [ { "declarator": "values", "modifier": "private", "original_string": "private Set<ImmutableBytesPtr> values;", "type": "Set<ImmutableBytesPtr>", "var_name": "values" }, { "declarator": "minValue", "modifier": "private", "original_string": "priva...
{ "body": "@Override\n public int hashCode() {\n if (!hashCodeSet) {\n final int prime = 31;\n int result = 1;\n result = prime * result + children.hashCode() + values.hashCode();\n hashCode = result;\n hashCodeSet = true;\n }\n return has...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_86
{ "fields": [ { "declarator": "ROW = Bytes.toBytes(\"row\")", "modifier": "private static final", "original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");", "type": "byte[]", "var_name": "ROW" }, { "declarator": "QUALIFIER = Bytes.toBytes(\"qual\")"...
{ "body": "@Test\n public void testEncode() {\n assertEquals(VersionUtil.encodeVersion(\"0.94.5\"),VersionUtil.encodeVersion(\"0.94.5-mapR\"));\n assertTrue(VersionUtil.encodeVersion(\"0.94.6\")>VersionUtil.encodeVersion(\"0.94.5-mapR\"));\n assertTrue(VersionUtil.encodeVersion(\"0.94.6\")>Ver...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static long encodeVersion(String hbaseVersionStr, Configuration config) {\n long hbaseVersion = VersionUtil.encodeVersion(hbaseVersionStr);\n long isTableNamespaceMappingEnabled = SchemaUtil.isNamespaceMappingEnabled(PTableType.TABLE,\n new ReadOnlyProps(config.iterator(...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_69
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/ByteUtilTest.java", "identifier": "ByteUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNextKey() {\n byte[] key = new byte[] {1};\n assertEquals((byte)2, ByteUtil.nextKey(key)[0]); \n key = new byte[] {1, (byte)255};\n byte[] nextKey = ByteUtil.nextKey(key);\n byte[] expectedKey = new byte[] {2,(byte)0};\n assertArrayEquals...
{ "fields": [ { "declarator": "EMPTY_BYTE_ARRAY = new byte[0]", "modifier": "public static final", "original_string": "public static final byte[] EMPTY_BYTE_ARRAY = new byte[0];", "type": "byte[]", "var_name": "EMPTY_BYTE_ARRAY" }, { "declarator": "EMPTY_BYTE_ARRAY_PTR ...
{ "body": "public static byte[] nextKey(byte[] key) {\n byte[] nextStartRow = new byte[key.length];\n System.arraycopy(key, 0, nextStartRow, 0, key.length);\n if (!nextKey(nextStartRow, nextStartRow.length)) {\n return null;\n }\n return nextStartRow;\n }", "class_me...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_28
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testBulkAllocationAscendingNextValueWithinLimit() throws SQLException {\n assertFalse(SequenceUtil.checkIfLimitReached(5, MIN_VALUE, MAX_VALUE, 2/* incrementBy */, CACHE_SIZE, 2));\n\n }", "class_method_signature": "SequenceUtilTest.testBulkAllocationAscendingNextValueWit...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_90
{ "fields": [ { "declarator": "ROW = Bytes.toBytes(\"row\")", "modifier": "private static final", "original_string": "private static final byte[] ROW = Bytes.toBytes(\"row\");", "type": "byte[]", "var_name": "ROW" }, { "declarator": "QUALIFIER = Bytes.toBytes(\"qual\")"...
{ "body": "@Test\n public void testTaggingAPutUnconditionally() throws Exception {\n Put put = generateOriginalPut();\n\n // valueArray is null so we always set tags\n MetaDataUtil.conditionallyAddTagsToPutCells(put, TABLE_FAMILY_BYTES, QUALIFIER,\n mockBuilder, null, DUMMY_TAGS...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MetaDataUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MetaDataUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static void conditionallyAddTagsToPutCells(Put somePut, byte[] family, byte[] qualifier,\n ExtendedCellBuilder cellBuilder, byte[] valueArray, byte[] tagArray) {\n NavigableMap<byte[], List<Cell>> familyCellMap = somePut.getFamilyCellMap();\n List<Cell> cells = familyCellMap...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_185
{ "fields": [ { "declarator": "region", "modifier": "private", "original_string": "private Region region;", "type": "Region", "var_name": "region" }, { "declarator": "rsServices", "modifier": "private", "original_string": "private RegionServerServices rsServ...
{ "body": "@Test\n public void testCheckRegionServerStoppingOnClose() throws Exception {\n when(conn.isClosed()).thenReturn(true);\n when(conn.isAborted()).thenReturn(false);\n\n mockScanner.close();\n\n verify(conn).isClosed();\n verify(callable, never()).call();\n verify...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(StatisticsScanner.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(StatisticsScanner.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@Override\n public void close() throws IOException {\n boolean async = getConfig().getBoolean(COMMIT_STATS_ASYNC, DEFAULT_COMMIT_STATS_ASYNC);\n StatisticsCollectionRunTracker collectionTracker = getStatsCollectionRunTracker(config);\n StatisticsScannerCallable callable = createCall...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_111
{ "fields": [ { "declarator": "testCache = null", "modifier": "static", "original_string": "static GuidePostsCache testCache = null;", "type": "GuidePostsCache", "var_name": "testCache" }, { "declarator": "phoenixStatsLoader = null", "modifier": "static", "o...
{ "body": "@Test(expected = PhoenixNonRetryableRuntimeException.class)\n public void loadAndGetGuidePostsCacheFactoryBadStringFailure(){\n helper.loadAndGetGuidePostsCacheFactory(\"not a class\");\n }", "class_method_signature": "GuidePostsCacheProviderTest.loadAndGetGuidePostsCacheFactoryBadStringFail...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@VisibleForTesting\n GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString) {\n Preconditions.checkNotNull(classString);\n if (guidePostsCacheFactory == null) {\n try {\n\n Class clazz = Class.forName(classString);\n if (!GuideP...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_53
{ "fields": [ { "declarator": "conn", "modifier": "private", "original_string": "private Connection conn;", "type": "Connection", "var_name": "conn" }, { "declarator": "converter", "modifier": "private", "original_string": "private StringToArrayConverter con...
{ "body": "@Test\n public void testToArray_MultipleElements() throws SQLException {\n Array multiElementArray = converter.toArray(\"one:two\");\n assertArrayEquals(\n new Object[]{\"one\", \"two\"},\n (Object[]) multiElementArray.getArray());\n }", "class_method_sig...
{ "fields": [ { "declarator": "splitter", "modifier": "private final", "original_string": "private final Splitter splitter;", "type": "Splitter", "var_name": "splitter" }, { "declarator": "conn", "modifier": "private final", "original_string": "private final...
{ "body": "public Array toArray(String input) throws SQLException {\n if (input == null || input.isEmpty()) {\n return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]);\n }\n return conn.createArrayOf(\n elementDataType.getSqlTypeName(),\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_146
{ "fields": [ { "declarator": "SCRUTINY_TIME_MILLIS = 1502908914193L", "modifier": "private static final", "original_string": "private static final long SCRUTINY_TIME_MILLIS = 1502908914193L;", "type": "long", "var_name": "SCRUTINY_TIME_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testConstructMetadataParamQuery() {\n String metadataParamQuery =\n IndexScrutinyTableOutput\n .constructMetadataParamQuery(Arrays.asList(\"INVALID_ROWS_QUERY_ALL\"));\n assertEquals(\n \"SELECT \\\"INVALID_ROWS_QUERY_ALL\\\" FROM PH...
{ "fields": [ { "declarator": "OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\"", "modifier": "public static", "original_string": "public static String OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\";", "type": "String", "var_name": "OUTPUT_TABLE_NAME" }, { "declarator": "...
{ "body": "static String constructMetadataParamQuery(List<String> metadataSelectCols) {\n String pkColsCsv = getPksCsv();\n String query =\n QueryUtil.constructSelectStatement(OUTPUT_METADATA_TABLE_NAME, metadataSelectCols,\n pkColsCsv, null, true);\n String inCl...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_150
{ "fields": [ { "declarator": "SCRUTINY_TIME_MILLIS = 1502908914193L", "modifier": "private static final", "original_string": "private static final long SCRUTINY_TIME_MILLIS = 1502908914193L;", "type": "long", "var_name": "SCRUTINY_TIME_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testGetSqlQueryBeyondMaxLookback() throws SQLException {\n SourceTargetColumnNames columnNames =\n new SourceTargetColumnNames.DataSourceColNames(pDataTable, pIndexTable);\n String query =\n IndexScrutinyTableOutput.getSqlQueryBeyondMaxLookback(con...
{ "fields": [ { "declarator": "OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\"", "modifier": "public static", "original_string": "public static String OUTPUT_TABLE_NAME = \"PHOENIX_INDEX_SCRUTINY\";", "type": "String", "var_name": "OUTPUT_TABLE_NAME" }, { "declarator": "...
{ "body": "public static String getSqlQueryBeyondMaxLookback(Connection conn,\n SourceTargetColumnNames columnNames, long scrutinyTimeMillis) throws SQLException {\n String whereQuery =\n constructOutputTableQuery(conn, columnNames,\n getPksCsv() + \", \" + SchemaUtil.getEscapedFul...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_45
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java", "identifier": "JDBCUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAutoCommit_TrueInProperties() {\n Properties props = new Properties();\n props.setProperty(\"AutoCommit\", \"true\");\n assertTrue(JDBCUtil.getAutoCommit(\"localhost\", props, false));\n }", "class_method_signature": "JDBCUtilTest.testGetAutoCommit_Tr...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java", "identifier": "JDBCUtil", "interfaces": "", "methods": [ { "class_method_signature": "JDBCUtil.JDBCUtil()", "constructor": true, "full_signature": "private JDBCUtil()", "identifier": "JDBCU...
{ "body": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue) {\n String autoCommit = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);\n if (autoCommit == null) {\n return defaultValue;\n }\n return Boolean.valueOf(autoCommit);\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_107
{ "fields": [ { "declarator": "cache", "modifier": "@Mock", "original_string": "@Mock\n GuidePostsCache cache;", "type": "GuidePostsCache", "var_name": "cache" }, { "declarator": "wrapper", "modifier": "", "original_string": "GuidePostsCacheWrapper wrappe...
{ "body": "@Test(expected = NullPointerException.class)\n public void invalidateAllTableDescriptorNull() {\n TableDescriptor tableDesc = null;\n wrapper.invalidateAll(tableDesc);\n }", "class_method_signature": "GuidePostsCacheWrapperTest.invalidateAllTableDescriptorNull()", "constructor": fal...
{ "fields": [ { "declarator": "guidePostsCache", "modifier": "private final", "original_string": "private final GuidePostsCache guidePostsCache;", "type": "GuidePostsCache", "var_name": "guidePostsCache" } ], "file": "phoenix-core/src/main/java/org/apache/phoenix/query/GuideP...
{ "body": "void invalidateAll(){\n guidePostsCache.invalidateAll();\n }", "class_method_signature": "GuidePostsCacheWrapper.invalidateAll()", "constructor": false, "full_signature": " void invalidateAll()", "identifier": "invalidateAll", "invocations": [ "invalidateAll" ], "modifiers": "",...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_12
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/ColumnInfoTest.java", "identifier": "ColumnInfoTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFromString_InvalidDataType() {\n try {\n ColumnInfo.fromString(\"COLNAME:badType\");\n } catch (RuntimeException e) {\n assertTrue(e.getCause() instanceof SQLException);\n SQLException sqlE = (SQLException)e.getCause();\n ...
{ "fields": [ { "declarator": "STR_SEPARATOR = \":\"", "modifier": "private static final", "original_string": "private static final String STR_SEPARATOR = \":\";", "type": "String", "var_name": "STR_SEPARATOR" }, { "declarator": "columnName", "modifier": "private ...
{ "body": "public static ColumnInfo fromString(String stringRepresentation) {\n List<String> components =\n Lists.newArrayList(stringRepresentation.split(\":\", 2));\n\n if (components.size() != 2) {\n throw new IllegalArgumentException(\"Unparseable string: \" + stringRepresen...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_170
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixDriverTest.java", "identifier": "PhoenixDriverTest", "interfaces": "", "superclass": "extends BaseConnectionlessQueryTest" }
{ "body": "@Test\n public void testFirstConnectionWhenUrlHasTenantId() throws Exception {\n final String tenantId = \"00Dxx0000001234\";\n String url = getUrl() + \";\" + PhoenixRuntime.TENANT_ID_ATTRIB + \"=\" + tenantId;\n Driver driver = new PhoenixTestDriver();\n\n driver.connect(ur...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(PhoenixDriver.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(PhoenixDriver.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Override\n public Connection connect(String url, Properties info) throws SQLException {\n if (!acceptsURL(url)) {\n return null;\n }\n try {\n lockInterruptibly(LockMode.READ);\n checkClosed();\n return createConnection(url, info);\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_65
{ "fields": [ { "declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)", "modifier": "private static final", "original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);", "type": "ColumnInfo", "var_name": "ID_COLUMN" }, { ...
{ "body": "@Test\n public void testCreateConnectionFromConfiguration() throws Exception {\n Properties props = new Properties();\n // standard lookup. this already checks if we set hbase.zookeeper.clientPort\n Configuration conf = new Configuration(false);\n conf.set(HConstants.ZOOKEEPE...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "public static String getConnectionUrl(Properties props, Configuration conf)\n throws SQLException {\n return getConnectionUrl(props, conf, null);\n }", "class_method_signature": "QueryUtil.getConnectionUrl(Properties props, Configuration conf)", "constructor": false, "full_signat...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_127
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(TestIndexWriter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(TestIndexWriter.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "@Test\n public void getDefaultFailurePolicy() throws Exception {\n Configuration conf = new Configuration(false);\n RegionCoprocessorEnvironment env = Mockito.mock(RegionCoprocessorEnvironment.class);\n Region region = Mockito.mock(Region.class);\n Mockito.when(env.getRegion()).thenReturn(regi...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(IndexWriter.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(IndexWriter.class);", "type": "Logger", "var_name": "LOGGER" }, { "d...
{ "body": "public static IndexFailurePolicy getFailurePolicy(RegionCoprocessorEnvironment env)\n throws IOException {\n Configuration conf = env.getConfiguration();\n try {\n IndexFailurePolicy committer =\n conf.getClass(INDEX_FAILURE_POLICY_CONF_KEY, PhoenixIndexFailurePolicy.class,\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_32
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testBulkAllocationDescendingNextValueWithinLimit() throws SQLException {\n assertFalse(SequenceUtil.checkIfLimitReached(8, MIN_VALUE, MAX_VALUE, -2/* incrementBy */, CACHE_SIZE, 2));\n\n }", "class_method_signature": "SequenceUtilTest.testBulkAllocationDescendingNextValue...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_1
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(XMLResultHandlerTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(XMLResultHandlerTest.class);", "type": "Logger", "var_name": "LOGGER" ...
{ "body": "@Test\n public void testDTDInResults() throws Exception {\n URL resultsUrl = XMLConfigParserTest.class.getResource(\"/malicious_results_with_dtd.xml\");\n assertNotNull(resultsUrl);\n File resultsFile = new File(resultsUrl.getFile());\n XMLResultHandler handler = new XMLResul...
{ "fields": [], "file": "phoenix-pherf/src/main/java/org/apache/phoenix/pherf/result/impl/XMLResultHandler.java", "identifier": "XMLResultHandler", "interfaces": "", "methods": [ { "class_method_signature": "XMLResultHandler.XMLResultHandler()", "constructor": true, "full_signature": "pu...
{ "body": "List<Result> readFromResultFile(File resultsFile) throws Exception {\n XMLInputFactory xif = XMLInputFactory.newInstance();\n xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);\n xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);\n JAXBContext jaxbContext...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_24
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testDescendingNextValueLessThanMinValue() throws SQLException {\n \tassertTrue(SequenceUtil.checkIfLimitReached(2, MIN_VALUE, MAX_VALUE, -2/* incrementBy */, CACHE_SIZE));\n }", "class_method_signature": "SequenceUtilTest.testDescendingNextValueLessThanMinValue()", "constru...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_131
{ "fields": [ { "declarator": "overAllQueryMetrics", "modifier": "private", "original_string": "private OverAllQueryMetrics overAllQueryMetrics;", "type": "OverAllQueryMetrics", "var_name": "overAllQueryMetrics" }, { "declarator": "numParallelScans = 10L", "modifi...
{ "body": "@Test\n public void testPublish() {\n MyClock clock = new MyClock(10L, delta);\n EnvironmentEdgeManager.injectEdge(clock);\n overAllQueryMetrics.startQuery();\n overAllQueryMetrics.startResultSetWatch();\n assertPublishedMetrics(overAllQueryMetrics.publish(), numParall...
{ "fields": [ { "declarator": "queryWatch", "modifier": "private final", "original_string": "private final MetricsStopWatch queryWatch;", "type": "MetricsStopWatch", "var_name": "queryWatch" }, { "declarator": "resultSetWatch", "modifier": "private final", "...
{ "body": "public Map<MetricType, Long> publish() {\n Map<MetricType, Long> metricsForPublish = new HashMap<>();\n metricsForPublish.put(numParallelScans.getMetricType(), numParallelScans.getValue());\n metricsForPublish.put(wallClockTimeMS.getMetricType(), wallClockTimeMS.getValue());\n m...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_189
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/PMetaDataImplTest.java", "identifier": "PMetaDataImplTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void shouldNotEvictMoreEntriesThanNecessary() throws Exception {\n TestTimeKeeper timeKeeper = new TestTimeKeeper();\n Map<String, String> props = Maps.newHashMapWithExpectedSize(2);\n props.put(QueryServices.MAX_CLIENT_METADATA_CACHE_SIZE_ATTRIB, \"5\");\n pro...
{ "fields": [ { "declarator": "metaData", "modifier": "private", "original_string": "private PMetaDataCache metaData;", "type": "PMetaDataCache", "var_name": "metaData" }, { "declarator": "timeKeeper", "modifier": "private final", "original_string": "private...
{ "body": "@Override\n public int size() {\n return metaData.size();\n }", "class_method_signature": "PMetaDataImpl.size()", "constructor": false, "full_signature": "@Override public int size()", "identifier": "size", "invocations": [ "size" ], "modifiers": "@Override public", "parame...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_73
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testDemonstrateSetNanosOnTimestampLosingMillis() {\n Timestamp ts1 = new Timestamp(120055);\n ts1.setNanos(60);\n \n Timestamp ts2 = new Timestamp(120100);\n ts2.setNanos(60);\n \n /*\n * This really should have been assertFals...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Timestamp getTimestamp(long millis, int nanos) {\n if (nanos > MAX_ALLOWED_NANOS || nanos < 0) {\n throw new IllegalArgumentException(\"nanos > \" + MAX_ALLOWED_NANOS + \" or < 0\");\n }\n Timestamp ts = new Timestamp(millis);\n if (ts.getNanos() + nanos...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_166
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixPreparedStatementTest.java", "identifier": "PhoenixPreparedStatementTest", "interfaces": "", "superclass": "extends BaseConnectionlessQueryTest" }
{ "body": "@Test\n public void testMutationUsingExecuteQueryShouldFail() throws Exception {\n Properties connectionProperties = new Properties();\n Connection connection = DriverManager.getConnection(getUrl(), connectionProperties);\n PreparedStatement stmt = connection.prepareStatement(\"DELE...
{ "fields": [ { "declarator": "parameterCount", "modifier": "private final", "original_string": "private final int parameterCount;", "type": "int", "var_name": "parameterCount" }, { "declarator": "parameters", "modifier": "private final", "original_string": ...
{ "body": "@Override\n public ResultSet executeQuery() throws SQLException {\n throwIfUnboundParameters();\n if (statement.getOperation().isMutation()) {\n throw new ExecuteQueryNotApplicableException(statement.getOperation());\n }\n \n return executeQuery(statement,cr...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_49
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java", "identifier": "JDBCUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetConsistency_TIMELINE_InProperties() {\n Properties props = new Properties();\n props.setProperty(PhoenixRuntime.CONSISTENCY_ATTRIB, \"TIMELINE\");\n assertTrue(JDBCUtil.getConsistencyLevel(\"localhost\", props, Consistency.STRONG.toString())\n =...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java", "identifier": "JDBCUtil", "interfaces": "", "methods": [ { "class_method_signature": "JDBCUtil.JDBCUtil()", "constructor": true, "full_signature": "private JDBCUtil()", "identifier": "JDBCU...
{ "body": "public static Consistency getConsistencyLevel(String url, Properties info, String defaultValue) {\n String consistency = findProperty(url, info, PhoenixRuntime.CONSISTENCY_ATTRIB);\n\n if(consistency != null && consistency.equalsIgnoreCase(Consistency.TIMELINE.toString())){\n retur...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_100
{ "fields": [ { "declarator": "bytesA = Bytes.toBytes(\"a\")", "modifier": "", "original_string": "byte[] bytesA = Bytes.toBytes(\"a\");", "type": "byte[]", "var_name": "bytesA" }, { "declarator": "bytesB = Bytes.toBytes(\"b\")", "modifier": "", "original_st...
{ "body": "@Test\n public void testSplitBar() {\n EquiDepthStreamHistogram histo = new EquiDepthStreamHistogram(10);\n Bar targetBar = new Bar(bytesA, bytesC);\n targetBar.incrementCount(31);\n histo.bars.add(targetBar);\n histo.splitBar(targetBar);\n assertEquals(2, histo...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class);", "type": "Logger", "var_name": "LOG...
{ "body": "@VisibleForTesting\n void splitBar(Bar origBar) {\n // short circuit - don't split a bar of length 1\n if (Bytes.compareTo(origBar.leftBoundInclusive, origBar.rightBoundExclusive) == 0) {\n return;\n }\n if (bars.size() == maxBars) { // max bars hit, need to merge ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_15
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/PhoenixRuntimeTest.java", "identifier": "PhoenixRuntimeTest", "interfaces": "", "superclass": "extends BaseConnectionlessQueryTest" }
{ "body": "@Test\n public void testParseArguments_FullOption() {\n PhoenixRuntime.ExecutionCommand execCmd = PhoenixRuntime.ExecutionCommand.parseArgs(\n new String[] { \"-t\", \"mytable\", \"myzkhost:2181\", \"--strict\", \"file1.sql\",\n \"test.csv\", \"file2.sql\", ...
{ "fields": [ { "declarator": "JDBC_PROTOCOL = \"jdbc:phoenix\"", "modifier": "public final static", "original_string": "public final static String JDBC_PROTOCOL = \"jdbc:phoenix\";", "type": "String", "var_name": "JDBC_PROTOCOL" }, { "declarator": "JDBC_THIN_PROTOCOL =...
{ "body": "private static List<PColumn> getColumns(PTable table, List<Pair<String, String>> columns) throws SQLException {\n List<PColumn> pColumns = new ArrayList<PColumn>(columns.size());\n for (Pair<String, String> column : columns) {\n pColumns.add(getColumn(table, column.getFirst(), colu...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_157
{ "fields": [ { "declarator": "TABLE_NAME = TableName.create(null,\"TABLE1\")", "modifier": "private static", "original_string": "private static TableName TABLE_NAME = TableName.create(null,\"TABLE1\");", "type": "TableName", "var_name": "TABLE_NAME" }, { "declarator": ...
{ "body": "@Test\n public void buildListOfRowKeyColumnExpressionsIndexTest() throws Exception {\n List<Expression> expressions = new ArrayList<>();\n\n PColumn\n column = new PColumnImpl(PName.EMPTY_COLUMN_NAME, PName.EMPTY_NAME, PDecimal.INSTANCE, 10, 1,\n true, 1, Sort...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class)", "modifier": "private final static", "original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@VisibleForTesting\n RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions (\n Expression whereExpression, boolean isIndex)\n throws RowValueConstructorOffsetNotCoercibleException, RowValueConstructorOffsetInternalErrorException {\n\n boolean trailingNull = false;\...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_42
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java", "identifier": "JDBCUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAutoCommit_NotSpecified_DefaultFalse() {\n assertFalse(JDBCUtil.getAutoCommit(\"localhost\", new Properties(), false));\n }", "class_method_signature": "JDBCUtilTest.testGetAutoCommit_NotSpecified_DefaultFalse()", "constructor": false, "full_signature": "@Test ...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java", "identifier": "JDBCUtil", "interfaces": "", "methods": [ { "class_method_signature": "JDBCUtil.JDBCUtil()", "constructor": true, "full_signature": "private JDBCUtil()", "identifier": "JDBCU...
{ "body": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue) {\n String autoCommit = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);\n if (autoCommit == null) {\n return defaultValue;\n }\n return Boolean.valueOf(autoCommit);\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_54
{ "fields": [ { "declarator": "conn", "modifier": "private", "original_string": "private Connection conn;", "type": "Connection", "var_name": "conn" }, { "declarator": "converter", "modifier": "private", "original_string": "private StringToArrayConverter con...
{ "body": "@Test\n public void testToArray_IntegerValues() throws SQLException {\n StringToArrayConverter intArrayConverter = new StringToArrayConverter(\n conn, \":\", PInteger.INSTANCE);\n Array intArray = intArrayConverter.toArray(\"1:2:3\");\n assertArrayEquals(\n ...
{ "fields": [ { "declarator": "splitter", "modifier": "private final", "original_string": "private final Splitter splitter;", "type": "Splitter", "var_name": "splitter" }, { "declarator": "conn", "modifier": "private final", "original_string": "private final...
{ "body": "public Array toArray(String input) throws SQLException {\n if (input == null || input.isEmpty()) {\n return conn.createArrayOf(elementDataType.getSqlTypeName(), new Object[0]);\n }\n return conn.createArrayOf(\n elementDataType.getSqlTypeName(),\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_141
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/iterate/OrderedResultIteratorTest.java", "identifier": "OrderedResultIteratorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNullIteratorOnClose() throws SQLException {\n ResultIterator delegate = ResultIterator.EMPTY_ITERATOR;\n List<OrderByExpression> orderByExpressions = Collections.singletonList(null);\n int thresholdBytes = Integer.MAX_VALUE;\n boolean spoolingEnabled = true;\n ...
{ "fields": [ { "declarator": "TO_EXPRESSION = new Function<OrderByExpression, Expression>() {\n @Override\n public Expression apply(OrderByExpression column) {\n return column.getExpression();\n }\n }", "modifier": "private static final", "original_string": "p...
{ "body": "@Override\n public void close() throws SQLException {\n // Guard against resultIterator being null\n if (null != resultIterator) {\n resultIterator.close();\n }\n resultIterator = PeekingResultIterator.EMPTY_ITERATOR;\n }", "class_method_signature": "OrderedRe...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_116
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/util/TestIndexManagementUtil.java", "identifier": "TestIndexManagementUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUncompressedWal() throws Exception {\n Configuration conf = new Configuration(false);\n // works with WALEditcodec\n conf.set(WALCellCodec.WAL_CELL_CODEC_CLASS_KEY, IndexedWALEditCodec.class.getName());\n IndexManagementUtil.ensureMutableIndexingCorrectlyConfigured(conf...
{ "fields": [ { "declarator": "INDEX_WAL_EDIT_CODEC_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec\"", "modifier": "public static final", "original_string": "public static final String INDEX_WAL_EDIT_CODEC_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.Index...
{ "body": "public static void ensureMutableIndexingCorrectlyConfigured(Configuration conf) throws IllegalStateException {\n\n // check to see if the WALEditCodec is installed\n if (isWALEditCodecSet(conf)) { return; }\n\n // otherwise, we have to install the indexedhlogreader, but it cannot have ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_97
{ "fields": [ { "declarator": "con", "modifier": "@Mock", "original_string": "@Mock PhoenixConnection con;", "type": "PhoenixConnection", "var_name": "con" } ], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/LogUtilTest.java", "identifier": "LogUtilTest", "in...
{ "body": "@Test\n public void testAddCustomAnnotations() {\n \twhen(con.getCustomTracingAnnotations()).thenReturn(ImmutableMap.of(\"a1\", \"v1\", \"a2\", \"v2\"));\n \t\n \tString logLine = LogUtil.addCustomAnnotations(\"log line\", con);\n \tassertTrue(logLine.contains(\"log line\"));\n \tassertTr...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/LogUtil.java", "identifier": "LogUtil", "interfaces": "", "methods": [ { "class_method_signature": "LogUtil.LogUtil()", "constructor": true, "full_signature": "private LogUtil()", "identifier": "LogUtil", ...
{ "body": "public static String addCustomAnnotations(@Nullable String logLine, @Nullable PhoenixConnection con) {\n \tif (con == null || con.getCustomTracingAnnotations() == null || con.getCustomTracingAnnotations().isEmpty()) {\n return logLine;\n \t} else {\n \t\treturn customAnnotationsToString...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_182
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java", "identifier": "PDataTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSeparatorBytes() {\n byte biggest = (byte) 0xFF;\n assertEquals(biggest, QueryConstants.DESC_SEPARATOR_BYTE);\n byte[] array = new byte[1];\n for (int i = Byte.MIN_VALUE; i <= Byte.MAX_VALUE; i++) {\n array[0] = (byte) i;\n assert...
{ "fields": [ { "declarator": "sqlTypeName", "modifier": "private final", "original_string": "private final String sqlTypeName;", "type": "String", "var_name": "sqlTypeName" }, { "declarator": "sqlType", "modifier": "private final", "original_string": "priva...
{ "body": "public final int compareTo(byte[] lhs, int lhsOffset, int lhsLength, SortOrder lhsSortOrder, byte[] rhs,\n int rhsOffset, int rhsLength, SortOrder rhsSortOrder, PDataType rhsType) {\n Preconditions.checkNotNull(lhsSortOrder);\n Preconditions.checkNotNull(rhsSortOrder);\n if ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_78
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test(expected=IllegalDataException.class)\n public void testParseTime_InvalidTime() {\n DateUtil.parseDate(\"not-a-time\");\n }", "class_method_signature": "DateUtilTest.testParseTime_InvalidTime()", "constructor": false, "full_signature": "@Test(expected=IllegalDataException.class) pub...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Date parseDate(String dateValue) {\n return new Date(parseDateTime(dateValue));\n }", "class_method_signature": "DateUtil.parseDate(String dateValue)", "constructor": false, "full_signature": "public static Date parseDate(String dateValue)", "identifier": "parseDate", "inv...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_39
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java", "identifier": "JDBCUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetCustomTracingAnnotationInBothPropertiesAndURL() {\n String annotKey1 = \"key1\";\n String annotVal1 = \"val1\";\n String annotKey2 = \"key2\";\n String annotVal2 = \"val2\";\n String annotKey3 = \"key3\";\n String annotVal3 = \"val3\";...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java", "identifier": "JDBCUtil", "interfaces": "", "methods": [ { "class_method_signature": "JDBCUtil.JDBCUtil()", "constructor": true, "full_signature": "private JDBCUtil()", "identifier": "JDBCU...
{ "body": "public static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info) {\n Preconditions.checkNotNull(url);\n Preconditions.checkNotNull(info);\n \n \tMap<String, String> combinedProperties = getCombinedConnectionProperties(url, info);\n \tMap<String, Str...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_194
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/expression/InListExpressionTest.java", "identifier": "InListExpressionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSortedRowValueConstructorExpressionList() {\n byte[] bytesValueOne = ByteBuffer.allocate(4).putInt(1).array();\n byte[] bytesValueTwo = ByteBuffer.allocate(4).putInt(1).array();\n // mock literal\n List<Expression> literalExpressions = new ArrayList...
{ "fields": [ { "declarator": "values", "modifier": "private", "original_string": "private Set<ImmutableBytesPtr> values;", "type": "Set<ImmutableBytesPtr>", "var_name": "values" }, { "declarator": "minValue", "modifier": "private", "original_string": "priva...
{ "body": "public static List<Expression> getSortedRowValueConstructorExpressionList(\n List<InListColumnKeyValuePair> inListColumnKeyValuePairList, boolean isStateless, int numberOfRows) {\n List<Expression> l = new ArrayList<>();\n //reconstruct columns\n List<Expression> keyExpressi...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_81
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testParseTimestamp_WithNanos() {\n assertEquals(123000000, DateUtil.parseTimestamp(\"1970-01-01 00:00:10.123\").getNanos());\n\n assertEquals(123456780, DateUtil.parseTimestamp(\"1970-01-01 00:00:10.12345678\").getNanos\n ());\n assertEquals(999999...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Timestamp parseTimestamp(String timestampValue) {\n Timestamp timestamp = new Timestamp(parseDateTime(timestampValue));\n int period = timestampValue.indexOf('.');\n if (period > 0) {\n String nanosStr = timestampValue.substring(period + 1);\n if (na...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_19
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testAscendingNextValueReachLimit() throws SQLException {\n \tassertFalse(SequenceUtil.checkIfLimitReached(6, MIN_VALUE, MAX_VALUE, 2/* incrementBy */, CACHE_SIZE));\n }", "class_method_signature": "SequenceUtilTest.testAscendingNextValueReachLimit()", "constructor": false,...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_58
{ "fields": [ { "declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)", "modifier": "private static final", "original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);", "type": "ColumnInfo", "var_name": "ID_COLUMN" }, { ...
{ "body": "@Test(expected=IllegalArgumentException.class)\n public void testConstructGenericUpsertStatement_NoColumns() {\n QueryUtil.constructGenericUpsertStatement(\"MYTAB\", 0);\n }", "class_method_signature": "QueryUtilTest.testConstructGenericUpsertStatement_NoColumns()", "constructor": false, ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "public static String constructGenericUpsertStatement(String tableName, int numColumns) {\n\n\n if (numColumns == 0) {\n throw new IllegalArgumentException(\"At least one column must be provided for upserts\");\n }\n\n List<String> parameterList = Lists.newArrayListWithCapaci...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_74
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testParseDate() {\n assertEquals(10000L, DateUtil.parseDate(\"1970-01-01 00:00:10\").getTime());\n }", "class_method_signature": "DateUtilTest.testParseDate()", "constructor": false, "full_signature": "@Test public void testParseDate()", "identifier": "testParseDate...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Date parseDate(String dateValue) {\n return new Date(parseDateTime(dateValue));\n }", "class_method_signature": "DateUtil.parseDate(String dateValue)", "constructor": false, "full_signature": "public static Date parseDate(String dateValue)", "identifier": "parseDate", "inv...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_161
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/cache/ServerCacheClientTest.java", "identifier": "ServerCacheClientTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAddServerCache() throws SQLException {\n PhoenixConnection connection = Mockito.mock(PhoenixConnection.class);\n ConnectionQueryServices services = Mockito.mock(ConnectionQueryServices.class);\n Mockito.when(services.getExecutor()).thenReturn(null);\n ...
{ "fields": [ { "declarator": "UUID_LENGTH = Bytes.SIZEOF_LONG", "modifier": "public static final", "original_string": "public static final int UUID_LENGTH = Bytes.SIZEOF_LONG;", "type": "int", "var_name": "UUID_LENGTH" }, { "declarator": "KEY_IN_FIRST_REGION = new byte...
{ "body": "public ServerCache addServerCache(\n ScanRanges keyRanges, final ImmutableBytesWritable cachePtr, final byte[] txState,\n final ServerCacheFactory cacheFactory, final PTable cacheUsingTable)\n throws SQLException {\n return addServerCache(keyRanges, cachePtr, txState...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_6
{ "fields": [ { "declarator": "exit = ExpectedSystemExit.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedSystemExit exit = ExpectedSystemExit.none();", "type": "ExpectedSystemExit", "var_name": "exit" } ], "file": "phoenix-p...
{ "body": "@Test\n public void testListArgument() {\n String[] args = {\"-listFiles\"};\n Pherf.main(args);\n }", "class_method_signature": "PherfTest.testListArgument()", "constructor": false, "full_signature": "@Test public void testListArgument()", "identifier": "testListArgument", "i...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Pherf.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Pherf.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public static void main(String[] args) {\n try {\n new Pherf(args).run();\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "class_method_signature": "Pherf.main(String[] args)", "constructor": false, "full_signature"...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_23
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testDescendingNextValueReachLimit() throws SQLException {\n \tassertFalse(SequenceUtil.checkIfLimitReached(5, MIN_VALUE, MAX_VALUE, -2/* incrementBy */, CACHE_SIZE));\n }", "class_method_signature": "SequenceUtilTest.testDescendingNextValueReachLimit()", "constructor": fals...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_136
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/monitoring/MetricUtilTest.java", "identifier": "MetricUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMetricsStopWatchWithMetricsFalse() throws Exception {\n MetricsStopWatch metricsStopWatch = MetricUtil.getMetricsStopWatch(false,\n LogLevel.OFF, WALL_CLOCK_TIME_MS);\n assertFalse(metricsStopWatch.getMetricsEnabled());\n }", "class_method_sig...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/monitoring/MetricUtil.java", "identifier": "MetricUtil", "interfaces": "", "methods": [ { "class_method_signature": "MetricUtil.getCombinableMetric(boolean isRequestMetricsEnabled,\n ...
{ "body": "public static MetricsStopWatch getMetricsStopWatch(boolean isRequestMetricsEnabled,\n LogLevel connectionLogLevel,\n MetricType type) {\n if(!type.isLoggingEnabled(connectionLogLevel) && !isRe...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_120
{ "fields": [ { "declarator": "TEST_TABLE_STRING = \"TEST_TABLE\"", "modifier": "private static final", "original_string": "private static final String TEST_TABLE_STRING = \"TEST_TABLE\";", "type": "String", "var_name": "TEST_TABLE_STRING" }, { "declarator": "TEST_TABLE...
{ "body": "@Test\n public void testRebuildMultipleVersionRow() throws IOException {\n // when doing a rebuild, we are replaying mutations so we want to ignore newer mutations\n // see LocalTable#getCurrentRowState()\n Mockito.when(mockIndexMetaData.getReplayWrite()).thenReturn(ReplayWrite.INDE...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NonTxIndexBuilder.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NonTxIndexBuilder.class);", "type": "Logger", "var_name": "LOGGER" } ]...
{ "body": "@Override\n public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState) throws IOException {\n \t// create a state manager, so we can manage each batch\n LocalTableState state = new LocalTableState(localHBaseState, m...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_35
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testIsCycleAllowedForStandardAllocation() {\n assertTrue(SequenceUtil.isCycleAllowed(1));\n }", "class_method_signature": "SequenceUtilTest.testIsCycleAllowedForStandardAllocation()", "constructor": false, "full_signature": "@Test public void testIsCycleAllowedForStan...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean isCycleAllowed(long numToAllocate) {\n return !isBulkAllocation(numToAllocate); \n \n }", "class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)", "constructor": false, "full_signature": "public static boolean isCycleAllowed(long numToAlloca...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_198
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/parse/CastParseNodeTest.java", "identifier": "CastParseNodeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToSQL() {\n ColumnParseNode columnParseNode = new ColumnParseNode(TableName.create(\"SCHEMA1\", \"TABLE1\"), \"V\");\n CastParseNode castParseNode = new CastParseNode(columnParseNode, PLong.INSTANCE, null, null, false);\n StringBuilder stringBuilder = new Str...
{ "fields": [ { "declarator": "dt", "modifier": "private final", "original_string": "private final PDataType dt;", "type": "PDataType", "var_name": "dt" }, { "declarator": "maxLength", "modifier": "private final", "original_string": "private final Integer ma...
{ "body": "@Override\n public void toSQL(ColumnResolver resolver, StringBuilder buf) {\n List<ParseNode> children = getChildren();\n buf.append(\" CAST(\");\n children.get(0).toSQL(resolver, buf);\n buf.append(\" AS \");\n boolean isArray = dt.isArrayType();\n PDataType ty...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_177
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java", "identifier": "PDataTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDateConversions() {\n long now = System.currentTimeMillis();\n Date date = new Date(now);\n Time t = new Time(now);\n Timestamp ts = new Timestamp(now);\n \n Object o = PDate.INSTANCE.toObject(ts, PTimestamp.INSTANCE);\n assertEqua...
{ "fields": [ { "declarator": "sqlTypeName", "modifier": "private final", "original_string": "private final String sqlTypeName;", "type": "String", "var_name": "sqlTypeName" }, { "declarator": "sqlType", "modifier": "private final", "original_string": "priva...
{ "body": "public abstract Object toObject(String value);", "class_method_signature": "PDataType.toObject(String value)", "constructor": false, "full_signature": "public abstract Object toObject(String value)", "identifier": "toObject", "invocations": [], "modifiers": "public abstract", "parameters": "(...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_62
{ "fields": [ { "declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)", "modifier": "private static final", "original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);", "type": "ColumnInfo", "var_name": "ID_COLUMN" }, { ...
{ "body": "@Test\n public void testConstructSelectStatementWithCaseSensitiveTable() {\n final String tableName = SchemaUtil.getEscapedArgument(\"mytab\");\n final String schemaName = SchemaUtil.getEscapedArgument(\"a\");\n final String fullTableName = SchemaUtil.getTableName(schemaName, tableN...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions) {\n List<String> columns = Lists.transform(columnInfos, new Function<ColumnInfo, String>(){\n @Override\n public String apply(ColumnInfo input) {\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_199
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/parse/CastParseNodeTest.java", "identifier": "CastParseNodeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToSQL_WithLengthAndScale() {\n ColumnParseNode columnParseNode = new ColumnParseNode(TableName.create(\"SCHEMA1\", \"TABLE1\"), \"V\");\n CastParseNode castParseNode = new CastParseNode(columnParseNode, PDecimal.INSTANCE, 5, 3, false);\n StringBuilder stringB...
{ "fields": [ { "declarator": "dt", "modifier": "private final", "original_string": "private final PDataType dt;", "type": "PDataType", "var_name": "dt" }, { "declarator": "maxLength", "modifier": "private final", "original_string": "private final Integer ma...
{ "body": "@Override\n public void toSQL(ColumnResolver resolver, StringBuilder buf) {\n List<ParseNode> children = getChildren();\n buf.append(\" CAST(\");\n children.get(0).toSQL(resolver, buf);\n buf.append(\" AS \");\n boolean isArray = dt.isArrayType();\n PDataType ty...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_176
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java", "identifier": "PDataTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testValueCoersion() throws Exception {\n // Testing coercing integer to other values.\n assertFalse(PDouble.INSTANCE.isCoercibleTo(PFloat.INSTANCE));\n assertTrue(PDouble.INSTANCE.isCoercibleTo(PFloat.INSTANCE, 10.0));\n assertTrue(PDouble.INSTANCE.isCoerc...
{ "fields": [ { "declarator": "sqlTypeName", "modifier": "private final", "original_string": "private final String sqlTypeName;", "type": "String", "var_name": "sqlTypeName" }, { "declarator": "sqlType", "modifier": "private final", "original_string": "priva...
{ "body": "public boolean isCoercibleTo(PDataType targetType) {\n return this.equals(targetType) || targetType.equals(PVarbinary.INSTANCE);\n }", "class_method_signature": "PDataType.isCoercibleTo(PDataType targetType)", "constructor": false, "full_signature": "public boolean isCoercibleTo(PDataType t...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_63
{ "fields": [ { "declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)", "modifier": "private static final", "original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);", "type": "ColumnInfo", "var_name": "ID_COLUMN" }, { ...
{ "body": "@Test\n public void testConstructSelectWithHint() {\n assertEquals(\n \"SELECT /*+ NO_INDEX */ \\\"col1\\\" , \\\"col2\\\" FROM MYTAB WHERE (\\\"col2\\\"=? and \\\"col3\\\" is null)\",\n QueryUtil.constructSelectStatement(\"MYTAB\", Lists.newArrayList(\"col1\", \"col2\"),\n ...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions) {\n List<String> columns = Lists.transform(columnInfos, new Function<ColumnInfo, String>(){\n @Override\n public String apply(ColumnInfo input) {\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_121
{ "fields": [ { "declarator": "TEST_TABLE_STRING = \"TEST_TABLE\"", "modifier": "private static final", "original_string": "private static final String TEST_TABLE_STRING = \"TEST_TABLE\";", "type": "String", "var_name": "TEST_TABLE_STRING" }, { "declarator": "TEST_TABLE...
{ "body": "@Test(timeout = 10000)\n public void testManyVersions() throws IOException {\n // when doing a rebuild, we are replaying mutations so we want to ignore newer mutations\n // see LocalTable#getCurrentRowState()\n Mockito.when(mockIndexMetaData.getReplayWrite()).thenReturn(ReplayWrite....
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(NonTxIndexBuilder.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(NonTxIndexBuilder.class);", "type": "Logger", "var_name": "LOGGER" } ]...
{ "body": "@Override\n public Collection<Pair<Mutation, byte[]>> getIndexUpdate(Mutation mutation, IndexMetaData indexMetaData, LocalHBaseState localHBaseState) throws IOException {\n \t// create a state manager, so we can manage each batch\n LocalTableState state = new LocalTableState(localHBaseState, m...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_34
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testIsCycleAllowedForBulkAllocation() {\n assertFalse(SequenceUtil.isCycleAllowed(2));\n }", "class_method_signature": "SequenceUtilTest.testIsCycleAllowedForBulkAllocation()", "constructor": false, "full_signature": "@Test public void testIsCycleAllowedForBulkAllocat...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean isCycleAllowed(long numToAllocate) {\n return !isBulkAllocation(numToAllocate); \n \n }", "class_method_signature": "SequenceUtil.isCycleAllowed(long numToAllocate)", "constructor": false, "full_signature": "public static boolean isCycleAllowed(long numToAlloca...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_7
{ "fields": [ { "declarator": "exit = ExpectedSystemExit.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedSystemExit exit = ExpectedSystemExit.none();", "type": "ExpectedSystemExit", "var_name": "exit" } ], "file": "phoenix-p...
{ "body": "@Test\n public void testUnknownOption() {\n String[] args = {\"-drop\", \"all\", \"-q\", \"-m\",\"-bsOption\"};\n\n // Makes sure that System.exit(1) is called.\n exit.expectSystemExitWithStatus(1);\n Pherf.main(args);\n }", "class_method_signature": "PherfTest.testUnkno...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Pherf.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Pherf.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public static void main(String[] args) {\n try {\n new Pherf(args).run();\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(1);\n }\n }", "class_method_signature": "Pherf.main(String[] args)", "constructor": false, "full_signature"...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_22
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testDescendingNextValueWithinLimit() throws SQLException {\n \tassertFalse(SequenceUtil.checkIfLimitReached(6, MIN_VALUE, MAX_VALUE, -2/* incrementBy */, CACHE_SIZE));\n }", "class_method_signature": "SequenceUtilTest.testDescendingNextValueWithinLimit()", "constructor": fa...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_137
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/execute/DescVarLengthFastByteComparisonsTest.java", "identifier": "DescVarLengthFastByteComparisonsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNullIsSmallest() {\n byte[] b1 = ByteUtil.EMPTY_BYTE_ARRAY;\n byte[] b2 = Bytes.toBytes(\"a\");\n int cmp = DescVarLengthFastByteComparisons.compareTo(b1, 0, b1.length, b2, 0, b2.length);\n assertTrue(cmp < 0);\n cmp = DescVarLengthFastByteCompa...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/execute/DescVarLengthFastByteComparisons.java", "identifier": "DescVarLengthFastByteComparisons", "interfaces": "", "methods": [ { "class_method_signature": "DescVarLengthFastByteComparisons.DescVarLengthFastByteComparisons()", ...
{ "body": "public static int compareTo(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {\n return LexicographicalComparerHolder.BEST_COMPARER.compareTo(b1, s1, l1, b2, s2, l2);\n }", "class_method_signature": "DescVarLengthFastByteComparisons.compareTo(byte[] b1, int s1, int l1, byte[] b2, int s2, i...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_75
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testParseDate_PureDate() {\n assertEquals(0L, DateUtil.parseDate(\"1970-01-01\").getTime());\n }", "class_method_signature": "DateUtilTest.testParseDate_PureDate()", "constructor": false, "full_signature": "@Test public void testParseDate_PureDate()", "identifier": ...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Date parseDate(String dateValue) {\n return new Date(parseDateTime(dateValue));\n }", "class_method_signature": "DateUtil.parseDate(String dateValue)", "constructor": false, "full_signature": "public static Date parseDate(String dateValue)", "identifier": "parseDate", "inv...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_160
{ "fields": [ { "declarator": "TABLE_NAME = TableName.create(null,\"TABLE1\")", "modifier": "private static", "original_string": "private static TableName TABLE_NAME = TableName.create(null,\"TABLE1\");", "type": "TableName", "var_name": "TABLE_NAME" }, { "declarator": ...
{ "body": "@Test\n public void buildListOfRowKeyColumnExpressionsIsNullTest() throws Exception {\n List<Expression> expressions = new ArrayList<>();\n\n RowKeyColumnExpression rvc1 = new RowKeyColumnExpression();\n RowKeyColumnExpression rvc2 = new RowKeyColumnExpression();\n\n IsNullEx...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class)", "modifier": "private final static", "original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@VisibleForTesting\n RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions (\n Expression whereExpression, boolean isIndex)\n throws RowValueConstructorOffsetNotCoercibleException, RowValueConstructorOffsetInternalErrorException {\n\n boolean trailingNull = false;\...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_59
{ "fields": [ { "declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)", "modifier": "private static final", "original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);", "type": "ColumnInfo", "var_name": "ID_COLUMN" }, { ...
{ "body": "@Test\n public void testConstructSelectStatement() {\n assertEquals(\n \"SELECT \\\"ID\\\" , \\\"NAME\\\" FROM MYTAB\",\n QueryUtil.constructSelectStatement(\"MYTAB\", ImmutableList.of(ID_COLUMN,NAME_COLUMN),null));\n }", "class_method_signature": "QueryUtilTest...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "public static String constructSelectStatement(String fullTableName, List<ColumnInfo> columnInfos,final String conditions) {\n List<String> columns = Lists.transform(columnInfos, new Function<ColumnInfo, String>(){\n @Override\n public String apply(ColumnInfo input) {\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_18
{ "fields": [ { "declarator": "MIN_VALUE = 1", "modifier": "private static", "original_string": "private static long MIN_VALUE = 1;", "type": "long", "var_name": "MIN_VALUE" }, { "declarator": "MAX_VALUE = 10", "modifier": "private static", "original_string"...
{ "body": "@Test\n public void testAscendingNextValueWithinLimit() throws SQLException {\n assertFalse(SequenceUtil.checkIfLimitReached(5, MIN_VALUE, MAX_VALUE, 2/* incrementBy */, CACHE_SIZE));\n }", "class_method_signature": "SequenceUtilTest.testAscendingNextValueWithinLimit()", "constructor": fal...
{ "fields": [ { "declarator": "DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L", "modifier": "public static final", "original_string": "public static final long DEFAULT_NUM_SLOTS_TO_ALLOCATE = 1L;", "type": "long", "var_name": "DEFAULT_NUM_SLOTS_TO_ALLOCATE" } ], "file": "phoenix-core/src...
{ "body": "public static boolean checkIfLimitReached(long currentValue, long minValue, long maxValue,\n long incrementBy, long cacheSize, long numToAllocate) {\n long nextValue = 0;\n boolean increasingSeq = incrementBy > 0 ? true : false;\n // advance currentValue while checking for o...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_195
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/expression/function/ExternalSqlTypeIdFunctionTest.java", "identifier": "ExternalSqlTypeIdFunctionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEvaluate() throws SQLException {\n Expression inputArg = LiteralExpression.newConstant(\n PInteger.INSTANCE.getSqlType(), PInteger.INSTANCE);\n\n Object returnValue = executeFunction(inputArg);\n\n assertEquals(Types.INTEGER, returnValue);\n ...
{ "fields": [ { "declarator": "NAME = \"ExternalSqlTypeId\"", "modifier": "public static final", "original_string": "public static final String NAME = \"ExternalSqlTypeId\";", "type": "String", "var_name": "NAME" } ], "file": "phoenix-core/src/main/java/org/apache/phoenix/exp...
{ "body": "@Override\n public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) {\n Expression child = children.get(0);\n if (!child.evaluate(tuple, ptr)) {\n return false;\n }\n if (ptr.getLength() == 0) {\n return true;\n }\n int sqlType = c...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_80
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testParseTimestamp_WithMillis() {\n assertEquals(10123L, DateUtil.parseTimestamp(\"1970-01-01 00:00:10.123\").getTime());\n }", "class_method_signature": "DateUtilTest.testParseTimestamp_WithMillis()", "constructor": false, "full_signature": "@Test public void testPar...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Timestamp parseTimestamp(String timestampValue) {\n Timestamp timestamp = new Timestamp(parseDateTime(timestampValue));\n int period = timestampValue.indexOf('.');\n if (period > 0) {\n String nanosStr = timestampValue.substring(period + 1);\n if (na...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_38
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java", "identifier": "JDBCUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetCustomTracingAnnotationsWithNone() {\n String url = \"localhost;TenantId=abc;\";\n Map<String, String> customAnnotations = JDBCUtil.getAnnotations(url, new Properties());\n assertTrue(customAnnotations.isEmpty());\n }", "class_method_signature": "JDBC...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java", "identifier": "JDBCUtil", "interfaces": "", "methods": [ { "class_method_signature": "JDBCUtil.JDBCUtil()", "constructor": true, "full_signature": "private JDBCUtil()", "identifier": "JDBCU...
{ "body": "public static Map<String, String> getAnnotations(@NonNull String url, @NonNull Properties info) {\n Preconditions.checkNotNull(url);\n Preconditions.checkNotNull(info);\n \n \tMap<String, String> combinedProperties = getCombinedConnectionProperties(url, info);\n \tMap<String, Str...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_96
{ "fields": [ { "declarator": "con", "modifier": "@Mock", "original_string": "@Mock PhoenixConnection con;", "type": "PhoenixConnection", "var_name": "con" } ], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/LogUtilTest.java", "identifier": "LogUtilTest", "in...
{ "body": "@Test\n public void testAddCustomAnnotationsWithNullAnnotations() {\n \twhen(con.getCustomTracingAnnotations()).thenReturn(null);\n \t\n \tString logLine = LogUtil.addCustomAnnotations(\"log line\", con);\n \tassertEquals(logLine, \"log line\");\n }", "class_method_signature": "LogUtilT...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/LogUtil.java", "identifier": "LogUtil", "interfaces": "", "methods": [ { "class_method_signature": "LogUtil.LogUtil()", "constructor": true, "full_signature": "private LogUtil()", "identifier": "LogUtil", ...
{ "body": "public static String addCustomAnnotations(@Nullable String logLine, @Nullable PhoenixConnection con) {\n \tif (con == null || con.getCustomTracingAnnotations() == null || con.getCustomTracingAnnotations().isEmpty()) {\n return logLine;\n \t} else {\n \t\treturn customAnnotationsToString...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_183
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java", "identifier": "PDataTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFromSqlTypeName() {\n assertEquals(PVarchar.INSTANCE, PDataType.fromSqlTypeName(\"varchar\"));\n }", "class_method_signature": "PDataTypeTest.testFromSqlTypeName()", "constructor": false, "full_signature": "@Test public void testFromSqlTypeName()", "identifier":...
{ "fields": [ { "declarator": "sqlTypeName", "modifier": "private final", "original_string": "private final String sqlTypeName;", "type": "String", "var_name": "sqlTypeName" }, { "declarator": "sqlType", "modifier": "private final", "original_string": "priva...
{ "body": "public static PDataType fromSqlTypeName(String sqlTypeName) {\n for (PDataType t : PDataTypeFactory.getInstance().getTypes()) {\n if (t.getSqlTypeName().equalsIgnoreCase(sqlTypeName)) return t;\n }\n throw newIllegalDataException(\"Unsupported sql type: \" + sqlTypeName);\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_79
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test\n public void testParseTimestamp() {\n assertEquals(10000L, DateUtil.parseTimestamp(\"1970-01-01 00:00:10\").getTime());\n }", "class_method_signature": "DateUtilTest.testParseTimestamp()", "constructor": false, "full_signature": "@Test public void testParseTimestamp()", "identif...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Timestamp parseTimestamp(String timestampValue) {\n Timestamp timestamp = new Timestamp(parseDateTime(timestampValue));\n int period = timestampValue.indexOf('.');\n if (period > 0) {\n String nanosStr = timestampValue.substring(period + 1);\n if (na...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_117
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/hbase/index/util/TestIndexManagementUtil.java", "identifier": "TestIndexManagementUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCompressedWALWithCodec() throws Exception {\n Configuration conf = new Configuration(false);\n conf.setBoolean(HConstants.ENABLE_WAL_COMPRESSION, true);\n // works with WALEditcodec\n conf.set(WALCellCodec.WAL_CELL_CODEC_CLASS_KEY, IndexedWALEditCodec.class.getName());\...
{ "fields": [ { "declarator": "INDEX_WAL_EDIT_CODEC_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec\"", "modifier": "public static final", "original_string": "public static final String INDEX_WAL_EDIT_CODEC_CLASS_NAME = \"org.apache.hadoop.hbase.regionserver.wal.Index...
{ "body": "public static void ensureMutableIndexingCorrectlyConfigured(Configuration conf) throws IllegalStateException {\n\n // check to see if the WALEditCodec is installed\n if (isWALEditCodecSet(conf)) { return; }\n\n // otherwise, we have to install the indexedhlogreader, but it cannot have ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_55
{ "fields": [ { "declarator": "ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT)", "modifier": "private static final", "original_string": "private static final ColumnInfo ID_COLUMN = new ColumnInfo(\"ID\", Types.BIGINT);", "type": "ColumnInfo", "var_name": "ID_COLUMN" }, { ...
{ "body": "@Test\n public void testConstructUpsertStatement_ColumnInfos() {\n assertEquals(\n \"UPSERT INTO MYTAB (\\\"ID\\\", \\\"NAME\\\") VALUES (?, ?)\",\n QueryUtil.constructUpsertStatement(\"MYTAB\", ImmutableList.of(ID_COLUMN, NAME_COLUMN)));\n\n }", "class_method_...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(QueryUtil.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(QueryUtil.class);", "type": "Logger", "var_name": "LOGGER" }, { "decla...
{ "body": "public static String constructUpsertStatement(String tableName, List<ColumnInfo> columnInfos) {\n\n if (columnInfos.isEmpty()) {\n throw new IllegalArgumentException(\"At least one column must be provided for upserts\");\n }\n\n final List<String> columnNames = Lists.transfo...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_140
{ "fields": [ { "declarator": "exceptionRule = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exceptionRule = ExpectedException.none();", "type": "ExpectedException", "var_name": "exceptionRule" } ], "file":...
{ "body": "@Test\n public void testGetMutationBatchList() {\n byte[] r1 = Bytes.toBytes(1);\n byte[] r2 = Bytes.toBytes(2);\n byte[] r3 = Bytes.toBytes(3);\n byte[] r4 = Bytes.toBytes(4);\n // one put and one delete as a group\n {\n List<Mutation> list = Immutab...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(MutationState.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(MutationState.class);", "type": "Logger", "var_name": "LOGGER" }, { ...
{ "body": "public static List<List<Mutation>> getMutationBatchList(long batchSize, long batchSizeBytes, List<Mutation> allMutationList) {\n Preconditions.checkArgument(batchSize> 1,\n \"Mutation types are put or delete, for one row all mutations must be in one batch.\");\n Preconditions.c...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_156
{ "fields": [ { "declarator": "TABLE_NAME = TableName.create(null,\"TABLE1\")", "modifier": "private static", "original_string": "private static TableName TABLE_NAME = TableName.create(null,\"TABLE1\");", "type": "TableName", "var_name": "TABLE_NAME" }, { "declarator": ...
{ "body": "@Test\n public void buildListOfRowKeyColumnExpressionsTest() throws Exception {\n List<Expression> expressions = new ArrayList<>();\n\n RowKeyColumnExpression rvc1 = new RowKeyColumnExpression();\n RowKeyColumnExpression rvc2 = new RowKeyColumnExpression();\n\n ComparisonExpr...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class)", "modifier": "private final static", "original_string": "private final static Logger LOGGER = LoggerFactory.getLogger(RVCOffsetCompiler.class);", "type": "Logger", "var_name": "LOGGER" }, ...
{ "body": "@VisibleForTesting\n RowKeyColumnExpressionOutput buildListOfRowKeyColumnExpressions (\n Expression whereExpression, boolean isIndex)\n throws RowValueConstructorOffsetNotCoercibleException, RowValueConstructorOffsetInternalErrorException {\n\n boolean trailingNull = false;\...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_43
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/JDBCUtilTest.java", "identifier": "JDBCUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetAutoCommit_TrueInUrl() {\n assertTrue(JDBCUtil.getAutoCommit(\"localhost;AutoCommit=TrUe\", new Properties(), false));\n }", "class_method_signature": "JDBCUtilTest.testGetAutoCommit_TrueInUrl()", "constructor": false, "full_signature": "@Test public void testG...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/JDBCUtil.java", "identifier": "JDBCUtil", "interfaces": "", "methods": [ { "class_method_signature": "JDBCUtil.JDBCUtil()", "constructor": true, "full_signature": "private JDBCUtil()", "identifier": "JDBCU...
{ "body": "public static boolean getAutoCommit(String url, Properties info, boolean defaultValue) {\n String autoCommit = findProperty(url, info, PhoenixRuntime.AUTO_COMMIT_ATTRIB);\n if (autoCommit == null) {\n return defaultValue;\n }\n return Boolean.valueOf(autoCommit);\n ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_101
{ "fields": [ { "declarator": "bytesA = Bytes.toBytes(\"a\")", "modifier": "", "original_string": "byte[] bytesA = Bytes.toBytes(\"a\");", "type": "byte[]", "var_name": "bytesA" }, { "declarator": "bytesB = Bytes.toBytes(\"b\")", "modifier": "", "original_st...
{ "body": "@Test\n public void testAddValues() {\n EquiDepthStreamHistogram histo = new EquiDepthStreamHistogram(3);\n for (int i = 0; i < 100; i++) {\n histo.addValue(Bytes.toBytes(i + \"\"));\n }\n // (expansion factor 7) * (3 buckets)\n assertEquals(21, histo.bars.s...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(EquiDepthStreamHistogram.class);", "type": "Logger", "var_name": "LOG...
{ "body": "public void addValue(byte[] value) {\n Bar bar = getBar(value);\n bar.incrementCount();\n totalCount++;\n // split the bar if necessary\n if (bar.getSize() > getMaxBarSize()) {\n splitBar(bar);\n }\n }", "class_method_signature": "EquiDepthStreamHis...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_14
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/PhoenixRuntimeTest.java", "identifier": "PhoenixRuntimeTest", "interfaces": "", "superclass": "extends BaseConnectionlessQueryTest" }
{ "body": "@Test\n public void testParseArguments_MinimalCase() {\n PhoenixRuntime.ExecutionCommand execCmd = PhoenixRuntime.ExecutionCommand.parseArgs(\n new String[] { \"localhost\", \"test.csv\" });\n\n\n assertEquals(\n \"localhost\",\n execCmd.getConn...
{ "fields": [ { "declarator": "JDBC_PROTOCOL = \"jdbc:phoenix\"", "modifier": "public final static", "original_string": "public final static String JDBC_PROTOCOL = \"jdbc:phoenix\";", "type": "String", "var_name": "JDBC_PROTOCOL" }, { "declarator": "JDBC_THIN_PROTOCOL =...
{ "body": "private static List<PColumn> getColumns(PTable table, List<Pair<String, String>> columns) throws SQLException {\n List<PColumn> pColumns = new ArrayList<PColumn>(columns.size());\n for (Pair<String, String> column : columns) {\n pColumns.add(getColumn(table, column.getFirst(), colu...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_179
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java", "identifier": "PDataTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetResultSetSqlType() {\n assertEquals(Types.INTEGER, PInteger.INSTANCE.getResultSetSqlType());\n assertEquals(Types.INTEGER, PUnsignedInt.INSTANCE.getResultSetSqlType());\n assertEquals(Types.BIGINT, PLong.INSTANCE.getResultSetSqlType());\n assertEqua...
{ "fields": [ { "declarator": "sqlTypeName", "modifier": "private final", "original_string": "private final String sqlTypeName;", "type": "String", "var_name": "sqlTypeName" }, { "declarator": "sqlType", "modifier": "private final", "original_string": "priva...
{ "body": "public int getResultSetSqlType() {\n return this.sqlType;\n }", "class_method_signature": "PDataType.getResultSetSqlType()", "constructor": false, "full_signature": "public int getResultSetSqlType()", "identifier": "getResultSetSqlType", "invocations": [], "modifiers": "public", "pa...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_83
{ "fields": [ { "declarator": "ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L", "modifier": "private static final", "original_string": "private static final long ONE_HOUR_IN_MILLIS = 1000L * 60L * 60L;", "type": "long", "var_name": "ONE_HOUR_IN_MILLIS" } ], "file": "phoenix-core/src/...
{ "body": "@Test(expected=IllegalDataException.class)\n public void testParseTimestamp_missingNanos() {\n DateUtil.parseTimestamp(\"1970-01-01 00:00:10.\");\n }", "class_method_signature": "DateUtilTest.testParseTimestamp_missingNanos()", "constructor": false, "full_signature": "@Test(expected=Ille...
{ "fields": [ { "declarator": "DEFAULT_TIME_ZONE_ID = \"GMT\"", "modifier": "public static final", "original_string": "public static final String DEFAULT_TIME_ZONE_ID = \"GMT\";", "type": "String", "var_name": "DEFAULT_TIME_ZONE_ID" }, { "declarator": "LOCAL_TIME_ZONE_I...
{ "body": "public static Timestamp parseTimestamp(String timestampValue) {\n Timestamp timestamp = new Timestamp(parseDateTime(timestampValue));\n int period = timestampValue.indexOf('.');\n if (period > 0) {\n String nanosStr = timestampValue.substring(period + 1);\n if (na...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_196
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/expression/function/InstrFunctionTest.java", "identifier": "InstrFunctionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInstrFunction() throws SQLException {\n inputExpression(\"abcdefghijkl\",PVarchar.INSTANCE, \"fgh\", 6, SortOrder.ASC);\n \n inputExpression(\"abcdefghijkl\",PVarchar.INSTANCE, \"fgh\", 6, SortOrder.DESC);\n \n inputExpression(\"abcde fghijkl\",...
{ "fields": [ { "declarator": "NAME = \"INSTR\"", "modifier": "public static final", "original_string": "public static final String NAME = \"INSTR\";", "type": "String", "var_name": "NAME" }, { "declarator": "literalSourceStr = null", "modifier": "private", ...
{ "body": "public InstrFunction() { }", "class_method_signature": "InstrFunction.InstrFunction()", "constructor": true, "full_signature": "public InstrFunction()", "identifier": "InstrFunction", "invocations": [], "modifiers": "public", "parameters": "()", "return": "", "signature": " InstrFunction...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_138
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/execute/DescVarLengthFastByteComparisonsTest.java", "identifier": "DescVarLengthFastByteComparisonsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testShorterSubstringIsBigger() {\n byte[] b1 = Bytes.toBytes(\"ab\");\n byte[] b2 = Bytes.toBytes(\"a\");\n int cmp = DescVarLengthFastByteComparisons.compareTo(b1, 0, b1.length, b2, 0, b2.length);\n assertTrue(cmp < 0);\n }", "class_method_signature"...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/execute/DescVarLengthFastByteComparisons.java", "identifier": "DescVarLengthFastByteComparisons", "interfaces": "", "methods": [ { "class_method_signature": "DescVarLengthFastByteComparisons.DescVarLengthFastByteComparisons()", ...
{ "body": "public static int compareTo(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {\n return LexicographicalComparerHolder.BEST_COMPARER.compareTo(b1, s1, l1, b2, s2, l2);\n }", "class_method_signature": "DescVarLengthFastByteComparisons.compareTo(byte[] b1, int s1, int l1, byte[] b2, int s2, i...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_8
{ "fields": [ { "declarator": "exit = ExpectedSystemExit.none()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final ExpectedSystemExit exit = ExpectedSystemExit.none();", "type": "ExpectedSystemExit", "var_name": "exit" } ], "file": "phoenix-p...
{ "body": "@Test\n public void testDefaultLogPerNRowsArgument() throws Exception {\n String[] args = {\"-listFiles\"};\n assertEquals(Long.valueOf(PherfConstants.LOG_PER_NROWS),\n getLogPerNRowsValue(new Pherf(args).getProperties()));\n }", "class_method_signature": "PherfTest.tes...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(Pherf.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(Pherf.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": ...
{ "body": "public Properties getProperties() {\n return this.properties;\n }", "class_method_signature": "Pherf.getProperties()", "constructor": false, "full_signature": "public Properties getProperties()", "identifier": "getProperties", "invocations": [], "modifiers": "public", "parameters": ...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_180
{ "fields": [], "file": "phoenix-core/src/test/java/org/apache/phoenix/schema/types/PDataTypeTest.java", "identifier": "PDataTypeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSampleValue() {\n PDataType[] types = PDataType.values();\n // Test validity of 10 sample values for each type\n for (int i = 0; i < 10; i++) {\n for (PDataType type : types) {\n Integer maxLength = \n (type...
{ "fields": [ { "declarator": "sqlTypeName", "modifier": "private final", "original_string": "private final String sqlTypeName;", "type": "String", "var_name": "sqlTypeName" }, { "declarator": "sqlType", "modifier": "private final", "original_string": "priva...
{ "body": "public abstract Object getSampleValue(Integer maxLength, Integer arrayLength);", "class_method_signature": "PDataType.getSampleValue(Integer maxLength, Integer arrayLength)", "constructor": false, "full_signature": "public abstract Object getSampleValue(Integer maxLength, Integer arrayLength)", "id...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_95
{ "fields": [ { "declarator": "con", "modifier": "@Mock", "original_string": "@Mock PhoenixConnection con;", "type": "PhoenixConnection", "var_name": "con" } ], "file": "phoenix-core/src/test/java/org/apache/phoenix/util/LogUtilTest.java", "identifier": "LogUtilTest", "in...
{ "body": "@Test\n public void testAddCustomAnnotationsWithNullConnection() {\n \tString logLine = LogUtil.addCustomAnnotations(\"log line\", (PhoenixConnection)null);\n \tassertEquals(logLine, \"log line\");\n }", "class_method_signature": "LogUtilTest.testAddCustomAnnotationsWithNullConnection()", "...
{ "fields": [], "file": "phoenix-core/src/main/java/org/apache/phoenix/util/LogUtil.java", "identifier": "LogUtil", "interfaces": "", "methods": [ { "class_method_signature": "LogUtil.LogUtil()", "constructor": true, "full_signature": "private LogUtil()", "identifier": "LogUtil", ...
{ "body": "public static String addCustomAnnotations(@Nullable String logLine, @Nullable PhoenixConnection con) {\n \tif (con == null || con.getCustomTracingAnnotations() == null || con.getCustomTracingAnnotations().isEmpty()) {\n return logLine;\n \t} else {\n \t\treturn customAnnotationsToString...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }
20473418_114
{ "fields": [ { "declarator": "testCache = null", "modifier": "static", "original_string": "static GuidePostsCache testCache = null;", "type": "GuidePostsCache", "var_name": "testCache" }, { "declarator": "phoenixStatsLoader = null", "modifier": "static", "o...
{ "body": "@Test\n public void getSingletonSimpleTest(){\n GuidePostsCacheFactory factory1 = helper.loadAndGetGuidePostsCacheFactory(\n TestGuidePostsCacheFactory.class.getTypeName());\n assertTrue(factory1 instanceof TestGuidePostsCacheFactory);\n\n GuidePostsCacheFactory facto...
{ "fields": [ { "declarator": "LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(GuidePostsCacheProvider.class);", "type": "Logger", "var_name": "LOGGE...
{ "body": "@VisibleForTesting\n GuidePostsCacheFactory loadAndGetGuidePostsCacheFactory(String classString) {\n Preconditions.checkNotNull(classString);\n if (guidePostsCacheFactory == null) {\n try {\n\n Class clazz = Class.forName(classString);\n if (!GuideP...
{ "created": "6/4/2014 7:00:08 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 20473418, "size": null, "stargazer_count": null, "stars": 752, "updates": "2020-01-27T08:20:53+00:00", "url": "https://github.com/apache/phoenix" }