id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
8582237_142
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@Test\n public void testSmallOffsetLimit() throws StandardException {\n int limit = 100;\n int offset = 2000;\n int total = 4000;\n StreamListener<ExecRow> sl = new StreamListener<>(limit, offset);\n HostAndPort hostAndPort = server.getHostAndPort();\n server.re...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDD.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAUL...
{ "body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_62
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java", "identifier": "UniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testEmptySelectivity() throws StandardException {\n Assert.assertEquals(1,impl.selectivity(new ValueRow(3)));\n }", "class_method_signature": "UniqueKeyStatisticsImplTest.testEmptySelectivity()", "constructor": false, "full_signature": "@Test public void testEmptySele...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long selectivity(ExecRow element) {\n return 1L;\n }", "class_method_signature": "UniqueKeyStatisticsImpl.selectivity(ExecRow element)", "constructor": false, "full_signature": "@Override public long selectivity(ExecRow element)", "identifier": "selectivity", "invo...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_154
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateSimpleOneCommittedTransaction() throws IOException {\n inputCells.addAll(Collections.singletonList(\n SITestUtils.getMockValueCell(100)));\n transactions.addAll(Collections.singletonList(\n TxnTestUtils.getMockCommittedTxn(100, 200)))...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_35
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/services/io/ArrayInputStreamTest.java", "identifier": "ArrayInputStreamTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSkipBytesNegative() throws IOException {\n ArrayInputStream ais = new ArrayInputStream(new byte[1000]);\n assertEquals(0, ais.skipBytes(-1));\n }", "class_method_signature": "ArrayInputStreamTest.testSkipBytesNegative()", "constructor": false, "full_signatu...
{ "fields": [ { "declarator": "pageData", "modifier": "private", "original_string": "private byte[] pageData;", "type": "byte[]", "var_name": "pageData" }, { "declarator": "start", "modifier": "private", "original_string": "private int\t\tstart;", "typ...
{ "body": "public final int skipBytes(int n) throws IOException {\n return (int) skip(n);\n }", "class_method_signature": "ArrayInputStream.skipBytes(int n)", "constructor": false, "full_signature": "public final int skipBytes(int n)", "identifier": "skipBytes", "invocations": [ "skip" ], ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_103
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/ByteSliceTest.java", "identifier": "ByteSliceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void reverse() {\n byte[] bytes = new byte[]{0, 1, 2, 3};\n ByteSlice byteSlice = ByteSlice.wrap(bytes);\n byteSlice.reverse();\n assertSame(bytes, byteSlice.array());\n assertArrayEquals(new byte[]{-1, -2, -3, -4}, byteSlice.array());\n }", "class_...
{ "fields": [ { "declarator": "hashFunction = HashFunctions.murmur3(0)", "modifier": "private static final", "original_string": "private static final Hash32 hashFunction = HashFunctions.murmur3(0);", "type": "Hash32", "var_name": "hashFunction" }, { "declarator": "EMPTY...
{ "body": "public void reverse() {\n for(int i=offset;i<offset+length;i++){\n buffer[i]^=0xff;\n }\n }", "class_method_signature": "ByteSlice.reverse()", "constructor": false, "full_signature": "public void reverse()", "identifier": "reverse", "invocations": [], "modifiers": "p...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_251
{ "fields": [ { "declarator": "txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SNAPSHOT_ISOLATION,Txn.ROOT_TRANSACTION,null,true,null)", "modifier": "private static final", "original_string": "private static final WritableTxn txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SN...
{ "body": "@Test\n public void testDDLTimesOut() throws Exception{\n /*\n * Test that we do the right thing when we time out on a ddl operation (e.g. when the initiator of the\n * change then dies and leaves behind junk that we have to clean up).\n *\n * This timeout is initi...
{ "fields": [ { "declarator": "LOG=Logger.getLogger(DDLWatchRefresher.class)", "modifier": "private static final", "original_string": "private static final Logger LOG=Logger.getLogger(DDLWatchRefresher.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "se...
{ "body": "public boolean refreshDDL(Set<DDLWatcher.DDLListener> callbacks) throws IOException{\n Collection<String> ongoingDDLChangeIds=watchChecker.getCurrentChangeIds();\n if(ongoingDDLChangeIds==null) return false;\n\n Set<Pair<DDLChange,String>> newChanges=new HashSet<>();\n boolean c...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_178
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateDoNotPurgeUpdateBecauseOverrideIsAboveWatermark() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(1200, 1210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockValueCell(1...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_197
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/concurrent/MoreExecutorsTest.java", "identifier": "MoreExecutorsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void namedSingleThreadScheduledExecutor() throws Exception {\n ScheduledExecutorService executorService = MoreExecutors.namedSingleThreadScheduledExecutor(\"testName-%d\");\n Future<String> threadName = executorService.submit(new GetThreadNameCallable());\n Future<Boo...
{ "fields": [], "file": "utilities/src/main/java/com/splicemachine/concurrent/MoreExecutors.java", "identifier": "MoreExecutors", "interfaces": "", "methods": [ { "class_method_signature": "MoreExecutors.MoreExecutors()", "constructor": true, "full_signature": "private MoreExecutors()",...
{ "body": "public static ScheduledExecutorService namedSingleThreadScheduledExecutor(String nameFormat) {\n ThreadFactory factory = new ThreadFactoryBuilder()\n .setNameFormat(nameFormat)\n .setDaemon(true)\n .build();\n return new LoggingScheduledThreadPoolE...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_206
{ "fields": [ { "declarator": "maxRuns=1000", "modifier": "private static final", "original_string": "private static final int maxRuns=1000;", "type": "int", "var_name": "maxRuns" }, { "declarator": "sampleData", "modifier": "private final", "original_string...
{ "body": "@Test\n public void testByteBufferSameAsByteArray() throws Exception {\n long correct = hasher.hash(sampleData,0,sampleData.length);\n ByteBuffer bb = ByteBuffer.wrap(sampleData);\n long actual = hasher.hash(bb);\n\n Assert.assertEquals(correct,actual);\n }", "class_meth...
{ "fields": [ { "declarator": "m = 0xc6a4a7935bd1e995L", "modifier": "private static final", "original_string": "private static final long m = 0xc6a4a7935bd1e995L;", "type": "long", "var_name": "m" }, { "declarator": "r = 47", "modifier": "private static final", ...
{ "body": "@Override\n public long hash(String elem) {\n assert elem!=null: \"Cannot hash a null element\";\n int length = elem.length();\n long h = initialize(seed,length);\n int pos =0;\n char[] chars = elem.toCharArray();\n while(length-pos>=8){\n h = hash(h,...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_19
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testCompareAnotherEmpty() {\n assertEquals(0, empty.compare(new FormatableBitSet()));\n }", "class_method_signature": "FormatableBitSetTest.testCompareAnotherEmpty()", "constructor": false, "full_signature": "@Test public void testCompareAnotherEmpty()", "identifier": "t...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public int compare(FormatableBitSet other)\n\t{\n\n\t\tint\t\totherCount, thisCount;\n\t\tint\t\totherLen, thisLen;\n\t\tbyte[]\totherb;\n\n\t\totherb = other.value;\n\t\totherLen = other.getLengthInBytes();\n\t\tthisLen = getLengthInBytes();\n\t\tfor (otherCount = 0, thisCount = 0;\n\t\t\t\totherCount < o...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_210
{ "fields": [ { "declarator": "maxRuns=1000", "modifier": "private static final", "original_string": "private static final int maxRuns=1000;", "type": "int", "var_name": "maxRuns" }, { "declarator": "sampleData", "modifier": "private final", "original_string...
{ "body": "@Test\n public void testMatchesGoogleVersionMurmur332SubBuffers() throws Exception {\n HashCode hashCode = Hashing.murmur3_32(0).hashBytes(sampleData, sampleOffset, sampleLength);\n int actual =hashCode.asInt();\n\n int hash = murmur32.hash(sampleData, sampleOffset, sampleLength);\n...
{ "fields": [ { "declarator": "c1 = 0xcc9e2d51", "modifier": "private static final", "original_string": "private static final int c1 = 0xcc9e2d51;", "type": "int", "var_name": "c1" }, { "declarator": "c2 = 0x1b873593", "modifier": "private static final", "or...
{ "body": "@Override\n public int hash(String elem) {\n assert elem!=null: \"Cannot hash a null element!\";\n int h = seed;\n int length = elem.length();\n int pos = 0;\n int visited =0;\n char[] chars = elem.toCharArray();\n while(length-visited>=4){\n /...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_139
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@Test\n public void testBlocking() throws StandardException {\n StreamListener<ExecRow> sl = new StreamListener<>();\n HostAndPort hostAndPort = server.getHostAndPort();\n server.register(sl);\n\n List<Tuple2<ExecRow,ExecRow>> manyRows = new ArrayList<>();\n for(int i ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDD.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAUL...
{ "body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_247
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test @Ignore(\"DB-5033\")\n public void test_IBM_SAP_timestampFormats() throws Exception {\n // IBM/SAP format (TIMESTAMP_B)\n assertEquals(\"2013-03-23 19:45:00.987654\", SpliceDateFunctions.TO_TIMESTAMP(\"2013-03-23-19:45:00.987654\",\"YYYY-MM-DD-HH.MM.SS.NNNNNN\").toString());\n ...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)", "constructor": false, "full_signature": "public static Timestamp TO_TIMESTAMP(String source)", "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_181
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateCalculatesSizeCorrectly() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockTombstoneCell(200),\n ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_58
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java", "identifier": "UniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testTotalCount() throws StandardException {\n Assert.assertEquals(10000,impl.totalCount());\n }", "class_method_signature": "UniqueKeyStatisticsImplTest.testTotalCount()", "constructor": false, "full_signature": "@Test public void testTotalCount()", "identifier": "t...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long totalCount() {\n return quantilesSketch.getN()+nullCount;\n }", "class_method_signature": "UniqueKeyStatisticsImpl.totalCount()", "constructor": false, "full_signature": "@Override public long totalCount()", "identifier": "totalCount", "invocations": [ "ge...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_119
{ "fields": [], "file": "hbase_sql/src/test/java/com/splicemachine/orc/TestOrcDataSourceUtils.java", "identifier": "TestOrcDataSourceUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMergeGap()\n {\n List<DiskRange> consistent10ByteGap = ImmutableList.of(new DiskRange(100, 90), new DiskRange(200, 90), new DiskRange(300, 90));\n assertEquals(mergeAdjacentDiskRanges(consistent10ByteGap, new DataSize(0, BYTE), new DataSize(1, GIGABYTE)), consist...
{ "fields": [], "file": "hbase_sql/src/main/java/com/splicemachine/orc/OrcDataSourceUtils.java", "identifier": "OrcDataSourceUtils", "interfaces": "", "methods": [ { "class_method_signature": "OrcDataSourceUtils.OrcDataSourceUtils()", "constructor": true, "full_signature": "private OrcD...
{ "body": "public static List<DiskRange> mergeAdjacentDiskRanges(Collection<DiskRange> diskRanges, DataSize maxMergeDistance, DataSize maxReadSize)\n {\n // sort ranges by start offset\n List<DiskRange> ranges = new ArrayList<>(diskRanges);\n Collections.sort(ranges, new Comparator<DiskRange>(...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_230
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void toDate_throwsOnInvalidDateFormat() throws SQLException, ParseException {\n expectedException.expect(SQLException.class);\n SpliceDateFunctions.TO_DATE(\"bad-format\", \"yyyy/MM/dd\");\n }", "class_method_signature": "SpliceDateFunctionsTest.toDate_throwsOnInvalidDa...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Date TO_DATE(String source) throws SQLException {\n return TO_DATE(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_DATE(String source)", "constructor": false, "full_signature": "public static Date TO_DATE(String source)", "identifier": "TO_DATE", "inv...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_78
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java", "identifier": "PrimaryKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testNullEndSelectivity() throws StandardException {\n Assert.assertEquals(8000.0d,(double) impl.rangeSelectivity(row2000,null,true,false),50.0d);\n }", "class_method_signature": "PrimaryKeyStatisticsImplTest.testNullEndSelectivity()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_97
{ "fields": [ { "declarator": "txnLifecycleManager", "modifier": "private", "original_string": "private ClientTxnLifecycleManager txnLifecycleManager;", "type": "ClientTxnLifecycleManager", "var_name": "txnLifecycleManager" }, { "declarator": "txnStore", "modifier...
{ "body": "@Test\n public void testCanSeeCommittedRowSnapshotIsolation() throws Exception{\n TxnSupplier baseStore=txnStore;\n\n TxnView committed=new CommittedTxn(0x100l,0x200l);\n baseStore.cache(committed);\n\n ReadResolver noopResolver=NoOpReadResolver.INSTANCE;\n TxnView myT...
{ "fields": [ { "declarator": "transactionStore", "modifier": "private final", "original_string": "private final TxnSupplier transactionStore;", "type": "TxnSupplier", "var_name": "transactionStore" }, { "declarator": "myTxn", "modifier": "private final", "o...
{ "body": "@Override\n public DataFilter.ReturnCode filterCell(DataCell keyValue) throws IOException{\n CellType type=keyValue.dataType();\n switch (type) {\n case COMMIT_TIMESTAMP:\n ensureTransactionIsCached(keyValue);\n return DataFilter.ReturnCode.SKIP;\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_267
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Test\n public void getOutputStream_createsStreamConnectedToExpectedFile() throws IOException {\n\n // given\n ExportParams exportParams = ExportParams.withDirectory(temporaryFolder.getRoot().getAbsolutePath());\n ExportFile exportFile = new ExportFile(exportParams, testTaskId(),dfs...
{ "fields": [ { "declarator": "SUCCESS_FILE = \"_SUCCESS\"", "modifier": "public static final", "original_string": "public static final String SUCCESS_FILE = \"_SUCCESS\";", "type": "String", "var_name": "SUCCESS_FILE" }, { "declarator": "fileSystem", "modifier": ...
{ "body": "public OutputStream getOutputStream() throws IOException {\n // Filename\n String fullyQualifiedExportFilePath = buildOutputFilePath();\n\n // OutputStream\n OutputStream rawOutputStream =fileSystem.newOutputStream(fullyQualifiedExportFilePath,\n new DistributedFi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_158
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateTombstones() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockTombstoneCell(200),\n SITestUtils.getMockValueCell(100)\n ));\n transactions.addAll(Arrays.asList(\n TxnTestUtils.getMockC...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_81
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java", "identifier": "NonUniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testNotNullCount() throws StandardException {\n Assert.assertEquals(10000,impl.notNullCount());\n }", "class_method_signature": "NonUniqueKeyStatisticsImplTest.testNotNullCount()", "constructor": false, "full_signature": "@Test public void testNotNullCount()", "iden...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "frequenciesSketch", "modifier": "private",...
{ "body": "@Override\n public long notNullCount() {\n return quantilesSketch.getN();\n }", "class_method_signature": "NonUniqueKeyStatisticsImpl.notNullCount()", "constructor": false, "full_signature": "@Override public long notNullCount()", "identifier": "notNullCount", "invocations": [ "g...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_271
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Ignore\n @Test\n public void createDirectory_returnsFalseWhenCannotCreate() throws IOException, StandardException {\n String testDir = \"/noPermissionToCreateFolderInRoot\";\n ExportParams exportParams = ExportParams.withDirectory(testDir);\n ExportFile exportFile = new ExportFi...
{ "fields": [ { "declarator": "SUCCESS_FILE = \"_SUCCESS\"", "modifier": "public static final", "original_string": "public static final String SUCCESS_FILE = \"_SUCCESS\";", "type": "String", "var_name": "SUCCESS_FILE" }, { "declarator": "fileSystem", "modifier": ...
{ "body": "public boolean createDirectory() throws StandardException {\n if (LOG.isDebugEnabled())\n SpliceLogUtils.debug(LOG, \"createDirectory(): export directory=%s\", exportParams.getDirectory());\n try {\n return fileSystem.createDirectory(exportParams.getDirectory(), false);\...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_39
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLSmallIntTest.java", "identifier": "SQLSmallIntTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test\n public void readExternal() throws IOException {\n SQLSmallint s = new SQLSmallint();\n MockObjectInput moi = new MockObjectInput();\n moi.isNull = false;\n moi.value = 42;\n s.readExternal(moi);\n Asser...
{ "fields": [ { "declarator": "SMALLINT_LENGTH = 2", "modifier": "static final", "original_string": "static final int SMALLINT_LENGTH = 2;", "type": "int", "var_name": "SMALLINT_LENGTH" }, { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLSmalli...
{ "body": "public void readExternal(ObjectInput in) throws IOException {\n\t\tisNull = in.readBoolean();\n\t\tvalue = in.readShort();\n\t}", "class_method_signature": "SQLSmallint.readExternal(ObjectInput in)", "constructor": false, "full_signature": "public void readExternal(ObjectInput in)", "identifier": "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_226
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void nextDayThrowsWhenPassedInvalidDay() throws SQLException {\n try{\n SpliceDateFunctions.NEXT_DAY(new Date(1L),\"not-a-week-day\");\n }catch(SQLException se){\n Assert.assertEquals(\"Invalid sql state!\",ErrorState.LANG_INVALID_DAY.getSqlState(),se.g...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Date NEXT_DAY(Date source, String weekday) throws SQLException {\n if (source == null || weekday == null) return source;\n String lowerWeekday = weekday.toLowerCase();\n if (!WEEK_DAY_MAP.containsKey(lowerWeekday)) {\n throw PublicAPI.wrapStandardException(Erro...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_174
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateCannotPurgeNonGhostingUpdates() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(300, 310),\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_42
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLCharTest.java", "identifier": "SQLCharTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test\n public void rowValueToDVDValue() throws Exception {\n SQLChar char1 = new SQLChar(\"foobar\");\n SQLChar char2 = new SQLChar();\n ExecRow execRow = new ValueRow(2);\n execRow.setColumn(1, char1);\n execRow.setColumn(2...
{ "fields": [ { "declarator": "logger = Logger.getLogger(SQLChar.class)", "modifier": "private static", "original_string": "private static Logger logger = Logger.getLogger(SQLChar.class);", "type": "Logger", "var_name": "logger" }, { "declarator": "serialVersionUID = 12...
{ "body": "public String getString() throws StandardException\n {\n if (value == null) {\n\n int len = rawLength;\n\n if (len != -1) {\n\n // data is stored in the char[] array\n\n value = new String(rawData, 0, len);\n if (len > RETURN_SPAC...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_123
{ "fields": [ { "declarator": "POSITION_COUNT = 50000", "modifier": "private static final", "original_string": "private static final int POSITION_COUNT = 50000;", "type": "int", "var_name": "POSITION_COUNT" }, { "declarator": "tempFile", "modifier": "private stati...
{ "body": "@Test\n public void testTinyStripesReadCacheAt()\n throws IOException\n {\n DataSize maxMergeDistance = new DataSize(1, Unit.MEGABYTE);\n DataSize maxReadSize = new DataSize(8, Unit.MEGABYTE);\n\n TestingOrcDataSource testingOrcDataSource = new TestingOrcDataSource(Fak...
{ "fields": [ { "declarator": "dataSource", "modifier": "private final", "original_string": "private final OrcDataSource dataSource;", "type": "OrcDataSource", "var_name": "dataSource" }, { "declarator": "regionFinder", "modifier": "private final", "original...
{ "body": "@VisibleForTesting\n void readCacheAt(long offset)\n throws IOException\n {\n DiskRange newCacheRange = regionFinder.getRangeFor(offset);\n cachePosition = newCacheRange.getOffset();\n cacheLength = newCacheRange.getLength();\n if (cache.length < cacheLength) {\...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_15
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test\n public void testShrink() {\n bitset18.shrink(9);\n assertEquals(9, bitset18.getLength());\n assertEquals(2, bitset18.getLengthInBytes());\n assertEquals(5, bitset18.getNumBitsSet());\n assertTrue(bitset18.invariantHolds());\n assertEquals(2, bitset18.get...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public void shrink(int n)\n\t{\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\n\t\tif (n < 0 || n > lengthAsBits) {\n\t\t\tthrow new\n\t\t\t\tIllegalArgumentException(\"Bit set cannot shrink from \"+\n\t\t\t\t\t\t\t\t\t\t lengthAsBits+\" to \"+...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_135
{ "fields": [ { "declarator": "localBaseDir = \"target/HdfsDirFileTest\"", "modifier": "private static", "original_string": "private static String localBaseDir = \"target/HdfsDirFileTest\";", "type": "String", "var_name": "localBaseDir" } ], "file": "hbase_sql/src/test/java/c...
{ "body": "@Test\n\tpublic void testDeleteAll() throws IOException {\n\t\tHdfsDirFile dir = createHdfsDirFile(\"myfolder3\");\n\t\tAssert.assertTrue(\"Directory was not created\", dir.mkdir());\n\t\tHdfsDirFile file1 = createHdfsDirFile(dir, \"able3.txt\");\n\t\tAssert.assertTrue(\"File was not created\", file1.creat...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(HdfsDirFile.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(HdfsDirFile.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "path", ...
{ "body": "@Override\n\tpublic boolean deleteAll() {\n\t\ttry {\n\t\t\tFileSystem fs = getFileSystem();\n\t\t\treturn fs.delete(new Path(path), true);\n\t\t} catch (IOException e) {\n\t\t\tLOG.error(String.format(\"An exception occurred while deleting the path '%s'.\", path), e);\n\t\t\treturn false;\n\t\t}\n\t}", ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_162
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutatePartialPurge() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(300, 310),\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUti...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_54
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLIntegerTest.java", "identifier": "SQLIntegerTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test(expected = StandardException.class)\n public void testNegativeOverFlow() throws StandardException {\n SQLInteger integer1 = new SQLInteger(Integer.MIN_VALUE);\n SQLInteger integer2 = new SQLInteger(1);\n integer1.minus(integer1, integer2, null);\n ...
{ "fields": [ { "declarator": "INTEGER_LENGTH\t\t= 4", "modifier": "static final", "original_string": "static final int INTEGER_LENGTH\t\t= 4;", "type": "int", "var_name": "INTEGER_LENGTH" }, { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLInt...
{ "body": "public NumberDataValue minus(NumberDataValue result)\n\t\t\t\t\t\t\t\t\tthrows StandardException\n\t{\n\t\tint\t\toperandValue;\n\n\t\tif (result == null)\n\t\t{\n\t\t\tresult = new SQLInteger();\n\t\t}\n\n\t\tif (this.isNull())\n\t\t{\n\t\t\tresult.setToNull();\n\t\t\treturn result;\n\t\t}\n\n\t\toperandV...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_163
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutatePurgeKeepTombstones() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockTombstoneCell(200),\n SITe...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_55
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLIntegerTest.java", "identifier": "SQLIntegerTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test\n public void rowValueToDVDValue() throws Exception {\n SQLInteger int1 = new SQLInteger(10);\n SQLInteger int2 = new SQLInteger();\n ExecRow execRow = new ValueRow(2);\n execRow.setColumn(1, int1);\n execRow.setColumn(...
{ "fields": [ { "declarator": "INTEGER_LENGTH\t\t= 4", "modifier": "static final", "original_string": "static final int INTEGER_LENGTH\t\t= 4;", "type": "int", "var_name": "INTEGER_LENGTH" }, { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLInt...
{ "body": "public int\tgetInt()\n\t{\n\t\t/* This value is 0 if the SQLInteger is null */\n\t\treturn value;\n\t}", "class_method_signature": "SQLInteger.getInt()", "constructor": false, "full_signature": "public int getInt()", "identifier": "getInt", "invocations": [], "modifiers": "public", "parameter...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_134
{ "fields": [], "file": "hbase_sql/src/test/java/com/splicemachine/derby/stream/spark/SparkDataSetTest.java", "identifier": "SparkDataSetTest", "interfaces": "", "superclass": "extends AbstractDataSetTest" }
{ "body": "@Test\n public void testFoobar() {\n List<Row> foo = new ArrayList();\n for (int i = 0; i< 10; i++) {\n ValueRow row = new ValueRow(1);\n row.setColumn(1,new SQLInteger(i));\n foo.add(row);\n }\n\n StructType schema = DataTypes.createStructTyp...
{ "fields": [ { "declarator": "SPARK_COMPRESSION_OPTION = \"compression\"", "modifier": "private static", "original_string": "private static String SPARK_COMPRESSION_OPTION = \"compression\";", "type": "String", "var_name": "SPARK_COMPRESSION_OPTION" }, { "declarator": ...
{ "body": "@Override\n public <Op extends SpliceOperation> DataSet< V> filter(SplicePredicateFunction<Op, V> f) {\n return new SparkDataSet<>(rdd.filter(new SparkSpliceFunctionWrapper<>(f)), f.getSparkName());\n }", "class_method_signature": "SparkDataSet.filter(SplicePredicateFunction<Op, V> f)", "c...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_122
{ "fields": [], "file": "hbase_sql/src/test/java/com/splicemachine/orc/metadata/TestOrcMetadataReader.java", "identifier": "TestOrcMetadataReader", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetMaxSlice()\n throws Exception\n {\n int startCodePoint = MIN_CODE_POINT;\n int endCodePoint = MAX_CODE_POINT;\n Slice maxByte = Slices.wrappedBuffer(new byte[] { (byte) 0xFF });\n\n for (int i = startCodePoint; i < endCodePoint; i++) {...
{ "fields": [ { "declarator": "MAX_BYTE = Slices.wrappedBuffer(new byte[] { (byte) 0xFF })", "modifier": "private static final", "original_string": "private static final Slice MAX_BYTE = Slices.wrappedBuffer(new byte[] { (byte) 0xFF });", "type": "Slice", "var_name": "MAX_BYTE" }...
{ "body": "@VisibleForTesting\n public static Slice getMaxSlice(String maximum)\n {\n if (maximum == null) {\n return null;\n }\n\n int index = firstSurrogateCharacter(maximum);\n if (index == -1) {\n return Slices.utf8Slice(maximum);\n }\n // Appe...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_14
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test\n public void testGrowNeg() {\n try {\n bitset18.grow(-9);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n }", "class_method_signature": "FormatableBitSetTest.testGrowNeg()", "constructor": false, "full_signature": "@Test public vo...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public void grow(int n)\n\t{\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\n \t\tif (n < 0) {\n \t\t\tthrow new IllegalArgumentException(\"Bit set cannot grow from \"+\n \t\t\t\t\t\t\t\t\t\t\t lengthAsBits+\" to \"+n+\" bits\");\n \t\t}\n\t\...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_175
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutatePurgeOneColumnUpdatedOverAndOver() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(300, 310),\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_43
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLRealTest.java", "identifier": "SQLRealTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test(expected = StandardException.class)\n public void testPositiveOverFlow() throws StandardException {\n SQLReal float1 = new SQLReal(Float.MAX_VALUE);\n SQLReal float2 = new SQLReal(1.0f);\n float1.plus(float1,float2,null);\n }", "class_metho...
{ "fields": [ { "declarator": "REAL_LENGTH = 16", "modifier": "static final", "original_string": "static final int REAL_LENGTH = 16;", "type": "int", "var_name": "REAL_LENGTH" }, { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLReal.class)", ...
{ "body": "public NumberDataValue plus(NumberDataValue addend1,\n\t\t\t\t\t\t\tNumberDataValue addend2,\n\t\t\t\t\t\t\tNumberDataValue result)\n\t\t\t\tthrows StandardException\n\t{\n\t\tif (result == null)\n\t\t{\n\t\t\tresult = new SQLReal();\n\t\t}\n\n\t\tif (addend1.isNull() || addend2.isNull())\n\t\t{\n\t\t\tres...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_227
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void nextDayReturnsPassedDateWhenGivenNullDay() throws SQLException {\n Date source = new Date(1L);\n assertSame(source, SpliceDateFunctions.NEXT_DAY(source, null));\n }", "class_method_signature": "SpliceDateFunctionsTest.nextDayReturnsPassedDateWhenGivenNullDay()", ...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Date NEXT_DAY(Date source, String weekday) throws SQLException {\n if (source == null || weekday == null) return source;\n String lowerWeekday = weekday.toLowerCase();\n if (!WEEK_DAY_MAP.containsKey(lowerWeekday)) {\n throw PublicAPI.wrapStandardException(Erro...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_38
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLSmallIntTest.java", "identifier": "SQLSmallIntTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test\n public void writeExternal() throws StandardException, IOException {\n SQLSmallint s = new SQLSmallint(42);\n MockObjectOutput moo = new MockObjectOutput();\n s.writeExternal(moo);\n Assert.assertFalse(\"Shouldn't be null\", moo.isNu...
{ "fields": [ { "declarator": "SMALLINT_LENGTH = 2", "modifier": "static final", "original_string": "static final int SMALLINT_LENGTH = 2;", "type": "int", "var_name": "SMALLINT_LENGTH" }, { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLSmalli...
{ "body": "public void writeExternal(ObjectOutput out) throws IOException {\n\t\tout.writeBoolean(isNull);\n\t\tout.writeShort(value);\n\t}", "class_method_signature": "SQLSmallint.writeExternal(ObjectOutput out)", "constructor": false, "full_signature": "public void writeExternal(ObjectOutput out)", "identif...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_270
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Test\n public void createDirectory() throws IOException, StandardException {\n String testDir = temporaryFolder.getRoot().getAbsolutePath() + \"/\" + RandomStringUtils.randomAlphabetic(9);\n ExportParams exportParams = ExportParams.withDirectory(testDir);\n ExportFile exportFile = ...
{ "fields": [ { "declarator": "SUCCESS_FILE = \"_SUCCESS\"", "modifier": "public static final", "original_string": "public static final String SUCCESS_FILE = \"_SUCCESS\";", "type": "String", "var_name": "SUCCESS_FILE" }, { "declarator": "fileSystem", "modifier": ...
{ "body": "public boolean createDirectory() throws StandardException {\n if (LOG.isDebugEnabled())\n SpliceLogUtils.debug(LOG, \"createDirectory(): export directory=%s\", exportParams.getDirectory());\n try {\n return fileSystem.createDirectory(exportParams.getDirectory(), false);\...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_159
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutatePurgeTombstones() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockTombstoneCell(200),\n SITestUt...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_80
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java", "identifier": "NonUniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testNullCount() throws StandardException {\n Assert.assertEquals(0, impl.nullCount());\n }", "class_method_signature": "NonUniqueKeyStatisticsImplTest.testNullCount()", "constructor": false, "full_signature": "@Test public void testNullCount()", "identifier": "testN...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "frequenciesSketch", "modifier": "private",...
{ "body": "@Override\n public long nullCount() {\n return 0;\n }", "class_method_signature": "NonUniqueKeyStatisticsImpl.nullCount()", "constructor": false, "full_signature": "@Override public long nullCount()", "identifier": "nullCount", "invocations": [], "modifiers": "@Override public", ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_266
{ "fields": [], "file": "splice_machine/src/test/java/com/splicemachine/derby/impl/sql/execute/operations/IndexRowReaderTest.java", "identifier": "IndexRowReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReaderConcurrency() throws Exception {\n IndexRowReader irr = new IndexRowReader(\n null,\n null,\n null,\n 4000,\n 0, // numConcurrentLookup = 0\n 0,\n null,\n null,\n null,...
{ "fields": [ { "declarator": "LOG=Logger.getLogger(IndexRowReader.class)", "modifier": "protected static", "original_string": "protected static Logger LOG=Logger.getLogger(IndexRowReader.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "batchSize", ...
{ "body": "public int getMaxConcurrency() {return this.numBlocks;}", "class_method_signature": "IndexRowReader.getMaxConcurrency()", "constructor": false, "full_signature": "public int getMaxConcurrency()", "identifier": "getMaxConcurrency", "invocations": [], "modifiers": "public", "parameters": "()", ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_79
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java", "identifier": "PrimaryKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testFullScanSelectivity() throws StandardException {\n Assert.assertEquals(10000.0d,(double) impl.rangeSelectivity(null,null,true,false),50.0d);\n }", "class_method_signature": "PrimaryKeyStatisticsImplTest.testFullScanSelectivity()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_96
{ "fields": [], "file": "splice_si_api/src/test/java/com/splicemachine/si/impl/hlc/HLCTest.java", "identifier": "HLCTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void alwaysIncreasingLocalEvent() {\n HLC hlc = new HLC();\n long value = 0;\n for (int i = 0; i< 1000000; i++) {\n long comparison = hlc.sendOrLocalEvent();\n Assert.assertTrue(\"went backwards, catastophic\",value<comparison);\n valu...
{ "fields": [ { "declarator": "hlcNumBitsToShift = 12", "modifier": "public static final", "original_string": "public static final int hlcNumBitsToShift = 12;", "type": "int", "var_name": "hlcNumBitsToShift" }, { "declarator": "hlcLogicalBitsMask = (1 << hlcNumBitsToShi...
{ "body": "public long sendOrLocalEvent() {\n long currentHLC;\n long returnHLC;\n while (true) {\n currentHLC = atomicHLC.get();\n long[] hlc = HLCToPhysicalAndLogical(currentHLC);\n long logical = Math.max(hlc[0], System.currentTimeMillis());\n if (lo...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_231
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void toDateDefaultPattern() throws Exception {\n String source = \"2014-06-24\";\n DateFormat formatter = new SimpleDateFormat(\"MM/dd/yy\");\n Date date = new Date(formatter.parse(\"06/24/2014\").getTime());\n\n assertEquals(date, SpliceDateFunctions.TO_DATE(s...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Date TO_DATE(String source) throws SQLException {\n return TO_DATE(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_DATE(String source)", "constructor": false, "full_signature": "public static Date TO_DATE(String source)", "identifier": "TO_DATE", "inv...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_118
{ "fields": [], "file": "hbase_sql/src/test/java/com/splicemachine/orc/TestOrcDataSourceUtils.java", "identifier": "TestOrcDataSourceUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMergeAdjacent()\n {\n List<DiskRange> diskRanges = mergeAdjacentDiskRanges(\n ImmutableList.of(new DiskRange(100, 100), new DiskRange(200, 100), new DiskRange(300, 100)),\n new DataSize(0, BYTE),\n new DataSize(1, GIGABYTE));...
{ "fields": [], "file": "hbase_sql/src/main/java/com/splicemachine/orc/OrcDataSourceUtils.java", "identifier": "OrcDataSourceUtils", "interfaces": "", "methods": [ { "class_method_signature": "OrcDataSourceUtils.OrcDataSourceUtils()", "constructor": true, "full_signature": "private OrcD...
{ "body": "public static List<DiskRange> mergeAdjacentDiskRanges(Collection<DiskRange> diskRanges, DataSize maxMergeDistance, DataSize maxReadSize)\n {\n // sort ranges by start offset\n List<DiskRange> ranges = new ArrayList<>(diskRanges);\n Collections.sort(ranges, new Comparator<DiskRange>(...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_180
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutatePurgeUpdatesPrimaryKeys() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockValueCell(200, new boolean[]{}),\n ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_59
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java", "identifier": "UniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testMaxValue() throws StandardException {\n Assert.assertEquals(maxRow,impl.maxValue());\n }", "class_method_signature": "UniqueKeyStatisticsImplTest.testMaxValue()", "constructor": false, "full_signature": "@Test public void testMaxValue()", "identifier": "testMaxV...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public ExecRow maxValue() {\n return quantilesSketch.getMaxValue();\n }", "class_method_signature": "UniqueKeyStatisticsImpl.maxValue()", "constructor": false, "full_signature": "@Override public ExecRow maxValue()", "identifier": "maxValue", "invocations": [ "getMaxV...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_246
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void testSupportMultipleTimestampFormats() throws Exception {\n Timestamp ts = SpliceDateFunctions.TO_TIMESTAMP(\"2013-03-23 19:45:00.987654-05\",\"yyyy-MM-dd HH:mm:ss.SSSSSSZ\");\n\n // Jodatime does not support microseconds?\n // No longer using Joda DateTime.\n ...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)", "constructor": false, "full_signature": "public static Timestamp TO_TIMESTAMP(String source)", "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_138
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@Test\n public void testOrder() throws Exception {\n StreamListener<ExecRow> sl = new StreamListener<>();\n HostAndPort hostAndPort = server.getHostAndPort();\n server.register(sl);\n\n List<Tuple2<ExecRow,ExecRow>> shuffledRows = new ArrayList<>(tenRows);\n Collection...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDD.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAUL...
{ "body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_211
{ "fields": [ { "declarator": "maxRuns=1000", "modifier": "private static final", "original_string": "private static final int maxRuns=1000;", "type": "int", "var_name": "maxRuns" }, { "declarator": "sampleData", "modifier": "private final", "original_string...
{ "body": "@Test\n public void testByteBufferSameAsByteArray() throws Exception {\n int correct = murmur32.hash(sampleData,0,sampleData.length);\n ByteBuffer bb = ByteBuffer.wrap(sampleData);\n int actual = murmur32.hash(bb);\n\n Assert.assertEquals(correct,actual);\n }", "class_me...
{ "fields": [ { "declarator": "c1 = 0xcc9e2d51", "modifier": "private static final", "original_string": "private static final int c1 = 0xcc9e2d51;", "type": "int", "var_name": "c1" }, { "declarator": "c2 = 0x1b873593", "modifier": "private static final", "or...
{ "body": "@Override\n public int hash(String elem) {\n assert elem!=null: \"Cannot hash a null element!\";\n int h = seed;\n int length = elem.length();\n int pos = 0;\n int visited =0;\n char[] chars = elem.toCharArray();\n while(length-visited>=4){\n /...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_18
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testCompareSameEmpty() {\n assertEquals(0, empty.compare(empty));\n }", "class_method_signature": "FormatableBitSetTest.testCompareSameEmpty()", "constructor": false, "full_signature": "@Test public void testCompareSameEmpty()", "identifier": "testCompareSameEmpty", "i...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public int compare(FormatableBitSet other)\n\t{\n\n\t\tint\t\totherCount, thisCount;\n\t\tint\t\totherLen, thisLen;\n\t\tbyte[]\totherb;\n\n\t\totherb = other.value;\n\t\totherLen = other.getLengthInBytes();\n\t\tthisLen = getLengthInBytes();\n\t\tfor (otherCount = 0, thisCount = 0;\n\t\t\t\totherCount < o...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_207
{ "fields": [ { "declarator": "maxRuns=1000", "modifier": "private static final", "original_string": "private static final int maxRuns=1000;", "type": "int", "var_name": "maxRuns" }, { "declarator": "sampleData", "modifier": "private final", "original_string...
{ "body": "@Test\n public void testIntSameAsByteArray() throws Exception {\n byte[] bytes = Bytes.toBytes(sampleValue);\n long correct = hasher.hash(bytes,0,bytes.length);\n\n long actual = hasher.hash(sampleValue);\n\n Assert.assertEquals(\"Incorrect int hash!\",correct,actual);\n }...
{ "fields": [ { "declarator": "m = 0xc6a4a7935bd1e995L", "modifier": "private static final", "original_string": "private static final long m = 0xc6a4a7935bd1e995L;", "type": "long", "var_name": "m" }, { "declarator": "r = 47", "modifier": "private static final", ...
{ "body": "@Override\n public long hash(String elem) {\n assert elem!=null: \"Cannot hash a null element\";\n int length = elem.length();\n long h = initialize(seed,length);\n int pos =0;\n char[] chars = elem.toCharArray();\n while(length-pos>=8){\n h = hash(h,...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_179
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateDoNotPurgeOldUpdateBecauseOverrideStartedBeforeWatermarkButCommittedAfter() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(900, 1100),\n SITestUtils.getMockCommitCell(100, 110),\n SITes...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_196
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/concurrent/MoreExecutorsTest.java", "identifier": "MoreExecutorsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void newSingleThreadExecutor_usesThreadWithExpectedName() throws Exception {\n ExecutorService executorService = MoreExecutors.namedSingleThreadExecutor(\"testName-%d\", false);\n Future<String> threadName = executorService.submit(new GetThreadNameCallable());\n Futur...
{ "fields": [], "file": "utilities/src/main/java/com/splicemachine/concurrent/MoreExecutors.java", "identifier": "MoreExecutors", "interfaces": "", "methods": [ { "class_method_signature": "MoreExecutors.MoreExecutors()", "constructor": true, "full_signature": "private MoreExecutors()",...
{ "body": "public static ExecutorService namedSingleThreadExecutor(String nameFormat, boolean isDaemon) {\n ThreadFactory factory = new ThreadFactoryBuilder()\n .setNameFormat(nameFormat)\n .setDaemon(isDaemon)\n .build();\n return Executors.newSingleThreadEx...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_250
{ "fields": [ { "declarator": "txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SNAPSHOT_ISOLATION,Txn.ROOT_TRANSACTION,null,true,null)", "modifier": "private static final", "original_string": "private static final WritableTxn txn=new WritableTxn(0x100l,0x100l,null,Txn.IsolationLevel.SN...
{ "body": "@Test\n public void removesFinishedChange() throws Exception{\n TestChecker checker=getTestChecker();\n Clock clock = new IncrementingClock(0);\n\n TxnStore supplier = new TestingTxnStore(clock,new TestingTimestampSource(),null,100l);\n supplier.recordNewTransaction(txn);\n ...
{ "fields": [ { "declarator": "LOG=Logger.getLogger(DDLWatchRefresher.class)", "modifier": "private static final", "original_string": "private static final Logger LOG=Logger.getLogger(DDLWatchRefresher.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "se...
{ "body": "public boolean refreshDDL(Set<DDLWatcher.DDLListener> callbacks) throws IOException{\n Collection<String> ongoingDDLChangeIds=watchChecker.getCurrentChangeIds();\n if(ongoingDDLChangeIds==null) return false;\n\n Set<Pair<DDLChange,String>> newChanges=new HashSet<>();\n boolean c...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_34
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/services/io/ArrayInputStreamTest.java", "identifier": "ArrayInputStreamTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSkipNegative() throws IOException {\n ArrayInputStream ais = new ArrayInputStream(new byte[1000]);\n assertEquals(0, ais.skip(-1));\n }", "class_method_signature": "ArrayInputStreamTest.testSkipNegative()", "constructor": false, "full_signature": "@Test pub...
{ "fields": [ { "declarator": "pageData", "modifier": "private", "original_string": "private byte[] pageData;", "type": "byte[]", "var_name": "pageData" }, { "declarator": "start", "modifier": "private", "original_string": "private int\t\tstart;", "typ...
{ "body": "public long skip(long count) throws IOException {\n\n // return 0 on non-positive count, per javadoc for\n // InputStream.skip(long)\n if (count <= 0) {\n return 0;\n }\n\n // don't skip more bytes than we have available\n long toSkip = Math.min(count, ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_102
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/ByteSliceTest.java", "identifier": "ByteSliceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void find() {\n byte[] sourceBytes = new byte[]{1, 2, 3, 4, 5, 6, 7, 8, 9};\n ByteSlice byteSlice = ByteSlice.wrap(sourceBytes);\n assertEquals(0, byteSlice.find((byte) 1, 0));\n assertEquals(1, byteSlice.find((byte) 2, 0));\n assertEquals(2, byteSlice.f...
{ "fields": [ { "declarator": "hashFunction = HashFunctions.murmur3(0)", "modifier": "private static final", "original_string": "private static final Hash32 hashFunction = HashFunctions.murmur3(0);", "type": "Hash32", "var_name": "hashFunction" }, { "declarator": "EMPTY...
{ "body": "public int find(byte toFind, int startOffset){\n if(startOffset<0 || startOffset>=length) return -1;\n int finalOffset = offset+length;\n int position = 0;\n for(int i=offset+startOffset;i<finalOffset;i++){\n if(buffer[i]==toFind) {\n return position;\n...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_63
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java", "identifier": "UniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testIndividualSelectivity() throws StandardException {\n Assert.assertEquals(1,impl.selectivity(minRow));\n }", "class_method_signature": "UniqueKeyStatisticsImplTest.testIndividualSelectivity()", "constructor": false, "full_signature": "@Test public void testIndividu...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long selectivity(ExecRow element) {\n return 1L;\n }", "class_method_signature": "UniqueKeyStatisticsImpl.selectivity(ExecRow element)", "constructor": false, "full_signature": "@Override public long selectivity(ExecRow element)", "identifier": "selectivity", "invo...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_155
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateRolledBackTransaction() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockValueCell(300),\n SITestUtils.getMockValueCell(200),\n SITestUtils.getMockValueCell(100)\n ));\n transactions.a...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_75
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java", "identifier": "PrimaryKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testIndividualSelectivity() throws StandardException {\n Assert.assertEquals(1,impl.selectivity(minRow));\n }", "class_method_signature": "PrimaryKeyStatisticsImplTest.testIndividualSelectivity()", "constructor": false, "full_signature": "@Test public void testIndivid...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long selectivity(ExecRow element) {\n return 1L;\n }", "class_method_signature": "PrimaryKeyStatisticsImpl.selectivity(ExecRow element)", "constructor": false, "full_signature": "@Override public long selectivity(ExecRow element)", "identifier": "selectivity", "inv...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_143
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@Test\n public void testSmallLimit() throws StandardException {\n int limit = 2000;\n int offset = 0;\n int total = 4000;\n int batches = 2;\n int batchSize = 512;\n StreamListener<ExecRow> sl = new StreamListener<>(limit, offset, batches, batchSize);\n H...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDD.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAUL...
{ "body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_22
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testCompareToComplement() {\n assertEquals(1, bitset18.compare(bitset18C));\n }", "class_method_signature": "FormatableBitSetTest.testCompareToComplement()", "constructor": false, "full_signature": "@Test public void testCompareToComplement()", "identifier": "testCompare...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public int compare(FormatableBitSet other)\n\t{\n\n\t\tint\t\totherCount, thisCount;\n\t\tint\t\totherLen, thisLen;\n\t\tbyte[]\totherb;\n\n\t\totherb = other.value;\n\t\totherLen = other.getLengthInBytes();\n\t\tthisLen = getLengthInBytes();\n\t\tfor (otherCount = 0, thisCount = 0;\n\t\t\t\totherCount < o...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_114
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java", "identifier": "IntArraysTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplementMap8() throws Exception {\n int[] expected = new int[] {0,1,4,5};\n int[] input = new int[] {2,3};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n Assert.assertArrayEquals(prin...
{ "fields": [], "file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java", "identifier": "IntArrays", "interfaces": "", "methods": [ { "class_method_signature": "IntArrays.IntArrays()", "constructor": true, "full_signature": "private IntArrays()", "identifier"...
{ "body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_2
{ "fields": [ { "declarator": "TYPENAME = \"VARCHAR\"", "modifier": "private static final", "original_string": "private static final String TYPENAME = \"VARCHAR\";", "type": "String", "var_name": "TYPENAME" }, { "declarator": "HEADER_LENGTH = 2", "modifier": "priv...
{ "body": "@Test\n public void testSkipUntilEOFOnShortStreamCJK()\n throws IOException {\n final int charLength = 5;\n InputStream in = new ReaderToUTF8Stream(\n new LoopingAlphabetReader(charLength, CharAlphabet.cjkSubset()),\n charLength, 0, TYPENAME, new Ch...
{ "fields": [], "file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java", "identifier": "UTF8Util", "interfaces": "", "methods": [ { "class_method_signature": "UTF8Util.UTF8Util()", "constructor": true, "full_signature": "private UTF8Util()", "identifier": "U...
{ "body": "public static final long skipUntilEOF(InputStream in)\n throws IOException {\n // No need to do the skip in a loop, as Reader.read() returning -1\n // means EOF has been reached.\n // Note that a loop should be used if skip is used instead of read.\n return internalSk...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_29
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testAnySetBitEmpty() {\n assertEquals(empty.anySetBit(), -1);\n }", "class_method_signature": "FormatableBitSetTest.testAnySetBitEmpty()", "constructor": false, "full_signature": "@Test public void testAnySetBitEmpty()", "identifier": "testAnySetBitEmpty", "invocations...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public int anySetBit() {\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\t\tfinal int numbytes = getLengthInBytes();\n\t\tfor (int i = 0; i < numbytes; ++i) {\n\t\t\tfinal byte v = value[i];\n\t\t\tif (v == 0) continue;\n\t\t\treturn (umul8(i) +...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_236
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void toTimestampDefaultPattern() throws Exception {\n String source = \"2014-06-24T12:13:14.123\";\n DateFormat formatter = new SimpleDateFormat(\"MM/dd/yy HH:mm:ss.SSS\");\n Timestamp date = new Timestamp(formatter.parse(\"06/24/2014 12:13:14.123\").getTime());\n\n ...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Timestamp TO_TIMESTAMP(String source) throws SQLException {\n return TO_TIMESTAMP(source,null);\n }", "class_method_signature": "SpliceDateFunctions.TO_TIMESTAMP(String source)", "constructor": false, "full_signature": "public static Timestamp TO_TIMESTAMP(String source)", "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_9
{ "fields": [ { "declarator": "TYPENAME = \"VARCHAR\"", "modifier": "private static final", "original_string": "private static final String TYPENAME = \"VARCHAR\";", "type": "String", "var_name": "TYPENAME" }, { "declarator": "HEADER_LENGTH = 2", "modifier": "priv...
{ "body": "@Test\n public void testMissingSecondByteOfThree()\n throws IOException {\n // 0xef = 11101111\n byte[] data = {'a', (byte)0xef};\n InputStream is = new ByteArrayInputStream(data);\n try {\n UTF8Util.skipFully(is, 2);\n TestCase.fail(\"Reading...
{ "fields": [], "file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java", "identifier": "UTF8Util", "interfaces": "", "methods": [ { "class_method_signature": "UTF8Util.UTF8Util()", "constructor": true, "full_signature": "private UTF8Util()", "identifier": "U...
{ "body": "public static final long skipFully(InputStream in, long charsToSkip)\n throws EOFException, IOException {\n SkipCount skipped = internalSkip(in, charsToSkip);\n if (skipped.charsSkipped() != charsToSkip) {\n throw new EOFException(\"Reached end-of-stream prematurely at \...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_91
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java", "identifier": "NonUniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testFullScanSelectivity() throws StandardException {\n Assert.assertEquals(10000.0d,(double) impl.rangeSelectivity(null,null,true,false),50.0d);\n }", "class_method_signature": "NonUniqueKeyStatisticsImplTest.testFullScanSelectivity()", "constructor": false, "full_sig...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "frequenciesSketch", "modifier": "private",...
{ "body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_148
{ "fields": [], "file": "hbase_sql/src/test/java/com/splicemachine/SpliceDoNotRetryIOExceptionWrappingTest.java", "identifier": "SpliceDoNotRetryIOExceptionWrappingTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnwrap() throws Exception {\n\n // given\n StandardException stdExceptionIn = StandardException.newException(SQLState.LANG_COLUMN_ID, \"arg1\", \"arg2\", \"arg3\", \"arg4\");\n\n // when\n SpliceDoNotRetryIOException wrapped = SpliceDoNotRetryIOExcepti...
{ "fields": [ { "declarator": "GSON = new GsonBuilder()\n .registerTypeAdapter(StandardException.class, new StandardExceptionAdapter())\n .create()", "modifier": "private static final", "original_string": "private static final Gson GSON = new GsonBuilder()\n .reg...
{ "body": "public static Exception unwrap(SpliceDoNotRetryIOException spliceException) {\n String fullMessage = spliceException.getMessage();\n int firstColonIndex = fullMessage.indexOf(COLON);\n int openBraceIndex = fullMessage.indexOf(OPEN_BRACE);\n String exceptionType;\n if (fir...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_261
{ "fields": [], "file": "splice_machine/src/test/java/com/splicemachine/derby/impl/sql/execute/sequence/AbstractSequenceTest.java", "identifier": "AbstractSequenceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n\tpublic void singleThreaded1BlockSingleIncrementTestWithRollover() throws Exception {\n\t\tSequence sequence = new SpliceTestSequence(1,1,0);\n\t\tfor (long i = 0; i< 1000; i++) {\n\t\t\tlong next = sequence.getNext();\n\t\t\tAssert.assertTrue(i==next);\n\t\t}\n\t}", "class_method_signature": "Ab...
{ "fields": [ { "declarator": "remaining=new AtomicLong(0l)", "modifier": "protected final", "original_string": "protected final AtomicLong remaining=new AtomicLong(0l);", "type": "AtomicLong", "var_name": "remaining" }, { "declarator": "currPosition=new AtomicLong(0l)"...
{ "body": "public long getNext() throws StandardException{\n if(remaining.getAndDecrement()<=0)\n allocateBlock(false);\n return currPosition.getAndAdd(incrementSteps);\n }", "class_method_signature": "AbstractSequence.getNext()", "constructor": false, "full_signature": "public long ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_68
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java", "identifier": "PrimaryKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testNullCount() throws StandardException {\n Assert.assertEquals(0, impl.nullCount());\n }", "class_method_signature": "PrimaryKeyStatisticsImplTest.testNullCount()", "constructor": false, "full_signature": "@Test public void testNullCount()", "identifier": "testNul...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long nullCount() {\n return nullCount;\n }", "class_method_signature": "PrimaryKeyStatisticsImpl.nullCount()", "constructor": false, "full_signature": "@Override public long nullCount()", "identifier": "nullCount", "invocations": [], "modifiers": "@Override publi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_87
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/NonUniqueKeyStatisticsImplTest.java", "identifier": "NonUniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testIndividualSelectivity() throws StandardException {\n Assert.assertEquals(1,impl.selectivity(minRow));\n }", "class_method_signature": "NonUniqueKeyStatisticsImplTest.testIndividualSelectivity()", "constructor": false, "full_signature": "@Test public void testIndiv...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "frequenciesSketch", "modifier": "private",...
{ "body": "@Override\n public long selectivity(ExecRow element) {\n // Frequent Items\n long count = frequenciesSketch.getEstimate(element);\n if (count>0)\n return count;\n // Return Cardinality\n return (long) (quantilesSketch.getN()/thetaSketch.getEstimate()); // Sh...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_277
{ "fields": [], "file": "pipeline_api/src/test/java/com/splicemachine/pipeline/constraint/ConstraintContextTest.java", "identifier": "ConstraintContextTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void withOutMessage() {\n // given\n ConstraintContext context1 = new ConstraintContext(\"aa\", \"bb\", \"cc\");\n // when\n ConstraintContext context2 = context1.withoutMessage(0);\n ConstraintContext context3 = context1.withoutMessage(1);\n Cons...
{ "fields": [ { "declarator": "messageArgs", "modifier": "private", "original_string": "private String[] messageArgs;", "type": "String[]", "var_name": "messageArgs" } ], "file": "pipeline_api/src/main/java/com/splicemachine/pipeline/constraint/ConstraintContext.java", "ide...
{ "body": "public ConstraintContext withoutMessage(int index) {\n return new ConstraintContext((String[]) ArrayUtils.remove(messageArgs,index));\n }", "class_method_signature": "ConstraintContext.withoutMessage(int index)", "constructor": false, "full_signature": "public ConstraintContext withoutMessa...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_109
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java", "identifier": "IntArraysTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplementMap4() throws Exception {\n int[] expected = new int[] {0,1,2,3,4,5};\n int[] input = new int[] {};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n Assert.assertArrayEquals(pri...
{ "fields": [], "file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java", "identifier": "IntArrays", "interfaces": "", "methods": [ { "class_method_signature": "IntArrays.IntArrays()", "constructor": true, "full_signature": "private IntArrays()", "identifier"...
{ "body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_220
{ "fields": [ { "declarator": "DF = new SimpleDateFormat(\"yyyy/MM/dd\")", "modifier": "private static final", "original_string": "private static final DateFormat DF = new SimpleDateFormat(\"yyyy/MM/dd\");", "type": "DateFormat", "var_name": "DF" }, { "declarator": "DFT...
{ "body": "@Test\n public void testAddMonth() {\n Calendar c = Calendar.getInstance();\n Date t = new Date(c.getTime().getTime());\n c.add(Calendar.MONTH, 2);\n Date s = new Date(c.getTime().getTime());\n assertEquals(SpliceDateFunctions.ADD_MONTHS(t, 2), s);\n }", "class_me...
{ "fields": [ { "declarator": "WEEK_DAY_MAP = new ImmutableMap.Builder<String, Integer>()\n .put(\"sunday\", 1).put(\"monday\", 2).put(\"tuesday\", 3).put(\"wednesday\", 4).put(\"thursday\", 5)\n .put(\"friday\", 6).put(\"saturday\", 7).build()", "modifier": "private static final...
{ "body": "public static Date ADD_MONTHS(Date source, Integer numOfMonths) {\n if (source == null || numOfMonths == null) return null;\n DateTime dt = new DateTime(source);\n return new Date(dt.plusMonths(numOfMonths).getMillis());\n }", "class_method_signature": "SpliceDateFunctions.ADD_MON...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_172
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateDoNotPurgeLatestTombstoneDuringMinorCompactionMissingDeleteToken() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.get...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_44
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLRealTest.java", "identifier": "SQLRealTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test(expected = StandardException.class)\n public void testNegativeOverFlow() throws StandardException {\n SQLReal float1 = new SQLReal(Float.MIN_VALUE);\n SQLReal float2 = new SQLReal(1.0f);\n float1.minus(float1, float2, null);\n }", "class_me...
{ "fields": [ { "declarator": "REAL_LENGTH = 16", "modifier": "static final", "original_string": "static final int REAL_LENGTH = 16;", "type": "int", "var_name": "REAL_LENGTH" }, { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLReal.class)", ...
{ "body": "public NumberDataValue minus(NumberDataValue left,\n\t\t\t\t\t\t\tNumberDataValue right,\n\t\t\t\t\t\t\tNumberDataValue result)\n\t\t\t\tthrows StandardException\n\t{\n\t\tif (result == null)\n\t\t{\n\t\t\tresult = new SQLReal();\n\t\t}\n\n\t\tif (left.isNull() || right.isNull())\n\t\t{\n\t\t\tresult.setTo...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_125
{ "fields": [], "file": "hbase_sql/src/test/java/com/splicemachine/orc/block/IntegerColumnBlockTest.java", "identifier": "IntegerColumnBlockTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void setPartitionValueTest() {\n IntegerColumnBlock integerColumnBlock = new IntegerColumnBlock(null, DataTypes.IntegerType);\n integerColumnBlock.setPartitionValue(\"45\",1000);\n for (int i = 0; i< 1000; i++) {\n Assert.assertEquals(45,integerColumnBlock....
{ "fields": [], "file": "hbase_sql/src/main/java/com/splicemachine/orc/block/IntegerColumnBlock.java", "identifier": "IntegerColumnBlock", "interfaces": "", "methods": [ { "class_method_signature": "IntegerColumnBlock.IntegerColumnBlock(DataType type)", "constructor": true, "full_signatu...
{ "body": "@Override\n public void setPartitionValue(String value, int size) {\n columnVector = ColumnVector.allocate(size, dataType, MemoryMode.ON_HEAP);\n columnVector.appendInts(size,Integer.parseInt(value));\n }", "class_method_signature": "IntegerColumnBlock.setPartitionValue(String value, ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_13
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test\n public void testGrow() {\n bitset18.grow(25);\n assertEquals(25, bitset18.getLength());\n assertEquals(4, bitset18.getLengthInBytes());\n assertEquals(9, bitset18.getNumBitsSet());\n assertTrue(bitset18.invariantHolds());\n assertEquals(4, bitset18.getBy...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public void grow(int n)\n\t{\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\n \t\tif (n < 0) {\n \t\t\tthrow new IllegalArgumentException(\"Bit set cannot grow from \"+\n \t\t\t\t\t\t\t\t\t\t\t lengthAsBits+\" to \"+n+\" bits\");\n \t\t}\n\t\...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_133
{ "fields": [ { "declarator": "REGION_NAME = \"NetherRegion\"", "modifier": "private static final", "original_string": "private static final String REGION_NAME = \"NetherRegion\";", "type": "String", "var_name": "REGION_NAME" }, { "declarator": "mockCtx", "modifie...
{ "body": "@Test\n public void preStoreScannerOpenPartitionMiss() throws Exception {\n MemstoreAwareObserver mao = new MemstoreAwareObserver();\n\n // env and scan do not share same start and end keys (partition miss)\n ObserverContext<RegionCoprocessorEnvironment> fakeCtx = mockRegionEnv(crea...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(MemstoreAwareObserver.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(MemstoreAwareObserver.class);", "type": "Logger", "var_name": "LOG" }, { "decl...
{ "body": "@Override\n public RegionScanner postScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Scan scan, RegionScanner s) throws IOException {\n if (scan.getAttribute(MRConstants.SPLICE_SCAN_MEMSTORE_ONLY) != null &&\n Bytes.equals(scan.getAttribute(MRConstants.SPLICE_SCAN_MEMS...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_164
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateNonForcePurge() throws IOException {\n inputCells.addAll(Arrays.asList(\n SITestUtils.getMockCommitCell(200, 210),\n SITestUtils.getMockCommitCell(100, 110),\n SITestUtils.getMockTombstoneCell(200),\n SITestUtil...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_52
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLDecimalTest.java", "identifier": "SQLDecimalTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test\n public void testExecRowSparkRowConversion() throws StandardException {\n ValueRow execRow = new ValueRow(1);\n\n double initialValue = 10d;\n double val;\n for (int i = 1; i <= 38; i++) {\n val = Math.pow(init...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private BigDecimal\tvalue;", "type": "BigDecimal", "var_name": "value" }, { "declarator": "precision = -1", "modifier": "public", "original_string": "public int precision = -1;...
{ "body": "@Override\n\tpublic void setSparkObject(Object sparkObject) throws StandardException {\n\t\tif (sparkObject == null)\n\t\t\tsetToNull();\n\t\telse {\n\t\t\tvalue = (BigDecimal) sparkObject; //\n\t\t\tsetIsNull(false);\n\t\t}\n\t}", "class_method_signature": "SQLDecimal.setSparkObject(Object sparkObject)"...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_5
{ "fields": [ { "declarator": "TYPENAME = \"VARCHAR\"", "modifier": "private static final", "original_string": "private static final String TYPENAME = \"VARCHAR\";", "type": "String", "var_name": "TYPENAME" }, { "declarator": "HEADER_LENGTH = 2", "modifier": "priv...
{ "body": "@Test\n public void testSkipFullyOnValidLongStreamCJK()\n throws IOException {\n final int charLength = 161019;\n InputStream in = new ReaderToUTF8Stream(\n new LoopingAlphabetReader(charLength, CharAlphabet.cjkSubset()),\n charLength, 0, TYPENAME, ...
{ "fields": [], "file": "db-engine/src/main/java/com/splicemachine/db/iapi/util/UTF8Util.java", "identifier": "UTF8Util", "interfaces": "", "methods": [ { "class_method_signature": "UTF8Util.UTF8Util()", "constructor": true, "full_signature": "private UTF8Util()", "identifier": "U...
{ "body": "public static final long skipFully(InputStream in, long charsToSkip)\n throws EOFException, IOException {\n SkipCount skipped = internalSkip(in, charsToSkip);\n if (skipped.charsSkipped() != charsToSkip) {\n throw new EOFException(\"Reached end-of-stream prematurely at \...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_25
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testSetEmpty() {\n try {\n empty.set(-8);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n try {\n empty.set(-1);\n fail();\n } catch (IllegalArgumentException ignored) {\n }\n try {...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public void set(int position)\n\t{\n\t\tcheckPosition(position);\n\t\tfinal int byteIndex = udiv8(position);\n\t\tfinal byte bitIndex = umod8(position);\n\t\tvalue[byteIndex] |= (0x80>>bitIndex);\n\t}", "class_method_signature": "FormatableBitSet.set(int position)", "constructor": false, "full_signat...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_113
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java", "identifier": "IntArraysTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplementMap7() throws Exception {\n int[] expected = new int[] {1,2,3,4};\n int[] input = new int[] {0};\n int size = expected.length + input.length-1;\n\n try {\n IntArrays.complementMap(input,size);\n Assert.fail(\"Should have...
{ "fields": [], "file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java", "identifier": "IntArrays", "interfaces": "", "methods": [ { "class_method_signature": "IntArrays.IntArrays()", "constructor": true, "full_signature": "private IntArrays()", "identifier"...
{ "body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_282
{ "fields": [ { "declarator": "kp=new KryoPool(1)", "modifier": "private static final", "original_string": "private static final KryoPool kp=new KryoPool(1);", "type": "KryoPool", "var_name": "kp" }, { "declarator": "pef", "modifier": "private", "original_st...
{ "body": "@Test\n public void testCorrectlyRetriesPartialResults() throws Exception{\n byte[] table=Bytes.toBytes(\"1424\");\n TxnView txn=new ActiveWriteTxn(1l,1l,Txn.ROOT_TRANSACTION,true,Txn.IsolationLevel.SNAPSHOT_ISOLATION);\n Collection<BulkWrite> bwList=new ArrayList<>(2);\n bwL...
{ "fields": [ { "declarator": "LOG=Logger.getLogger(BulkWriteAction.class)", "modifier": "private static final", "original_string": "private static final Logger LOG=Logger.getLogger(BulkWriteAction.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "RETRY_...
{ "body": "@Override\n public WriteStats call() throws Exception{\n statusReporter.numExecutingFlushes.incrementAndGet();\n reportSize();\n long start=System.currentTimeMillis();\n try{\n Timer totalTimer=metricFactory.newTimer();\n totalTimer.startTiming();\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_72
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/PrimaryKeyStatisticsImplTest.java", "identifier": "PrimaryKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testMinValue() throws StandardException {\n Assert.assertEquals(minRow,impl.minValue());\n }", "class_method_signature": "PrimaryKeyStatisticsImplTest.testMinValue()", "constructor": false, "full_signature": "@Test public void testMinValue()", "identifier": "testMin...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public ExecRow minValue() {\n return quantilesSketch.getMinValue();\n }", "class_method_signature": "PrimaryKeyStatisticsImpl.minValue()", "constructor": false, "full_signature": "@Override public ExecRow minValue()", "identifier": "minValue", "invocations": [ "getMin...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_144
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDDTest.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDDTest.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "@Test\n public void testOffsetLimit() throws StandardException {\n StreamListener<ExecRow> sl = new StreamListener<>(400, 30000);\n HostAndPort hostAndPort = server.getHostAndPort();\n server.register(sl);\n\n List<Tuple2<ExecRow,ExecRow>> manyRows = new ArrayList<>();\n ...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(StreamableRDD.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(StreamableRDD.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "DEFAUL...
{ "body": "public void submit() throws Exception {\n Exception error = null;\n try {\n final JavaRDD<String> streamed = rdd.mapPartitionsWithIndex(new ResultStreamer(context, uuid, host, port, rdd.getNumPartitions(), clientBatches, clientBatchSize), true);\n int numPartitions = str...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_64
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/stats/UniqueKeyStatisticsImplTest.java", "identifier": "UniqueKeyStatisticsImplTest", "interfaces": "", "superclass": "extends AbstractKeyStatisticsImplTest" }
{ "body": "@Test\n public void testRangeSelectivity() throws StandardException {\n Assert.assertEquals(4000.0d,(double) impl.rangeSelectivity(row2000,row6000,true,false),50.0d);\n }", "class_method_signature": "UniqueKeyStatisticsImplTest.testRangeSelectivity()", "constructor": false, "full_signatu...
{ "fields": [ { "declarator": "quantilesSketch", "modifier": "private", "original_string": "private ItemsSketch<ExecRow> quantilesSketch;", "type": "ItemsSketch<ExecRow>", "var_name": "quantilesSketch" }, { "declarator": "nullCount", "modifier": "private", "...
{ "body": "@Override\n public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) {\n double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0];\n double stopSelectivity = stop==null?1.0d:quantilesSke...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_152
{ "fields": [ { "declarator": "watermark = 1000", "modifier": "private", "original_string": "private long watermark = 1000;", "type": "long", "var_name": "watermark" }, { "declarator": "cutNoPurge = new SICompactionStateMutate(\n new PurgeConfigBuilder().noPu...
{ "body": "@Test\n public void mutateEmpty() throws IOException {\n cutNoPurge.mutate(inputCells, transactions, outputCells);\n assertThat(outputCells, is(empty()));\n }", "class_method_signature": "SICompactionStateMutateTest.mutateEmpty()", "constructor": false, "full_signature": "@Test pu...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(SICompactionStateMutate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(SICompactionStateMutate.class);", "type": "Logger", "var_name": "LOG" }, { "...
{ "body": "public long mutate(List<Cell> rawList, List<TxnView> txns, List<Cell> results) throws IOException {\n handleSanityChecks(results, rawList, txns);\n long totalSize = 0;\n try {\n Iterator<TxnView> it = txns.iterator();\n for (Cell cell : rawList) {\n ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_33
{ "fields": [ { "declarator": "bits24", "modifier": "private", "original_string": "private byte[] bits24;", "type": "byte[]", "var_name": "bits24" }, { "declarator": "bits24C", "modifier": "private", "original_string": "private byte[] bits24C;", "type"...
{ "body": "@Test public void testAnySetBitBeyondBitPastEnd() {\n assertEquals(-1, bitset18.anySetBit(18));\n }", "class_method_signature": "FormatableBitSetTest.testAnySetBitBeyondBitPastEnd()", "constructor": false, "full_signature": "@Test public void testAnySetBitBeyondBitPastEnd()", "identifier"...
{ "fields": [ { "declarator": "value", "modifier": "private", "original_string": "private byte[]\tvalue;", "type": "byte[]", "var_name": "value" }, { "declarator": "bitsInLastByte", "modifier": "private", "original_string": "private\tbyte\tbitsInLastByte;", ...
{ "body": "public int anySetBit() {\n\t\tif (SanityManager.DEBUG) {\n\t\t\tSanityManager.ASSERT(invariantHolds(), \"broken invariant\");\n\t\t}\n\t\tfinal int numbytes = getLengthInBytes();\n\t\tfor (int i = 0; i < numbytes; ++i) {\n\t\t\tfinal byte v = value[i];\n\t\t\tif (v == 0) continue;\n\t\t\treturn (umul8(i) +...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_105
{ "fields": [], "file": "splice_encoding/src/test/java/com/splicemachine/utils/IntArraysTest.java", "identifier": "IntArraysTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComplementMap() throws Exception {\n int[] expected = new int[] {0,3,4,5};\n int[] input = new int[] {1,2};\n int size = expected.length + input.length;\n\n int[] complement = IntArrays.complementMap(input,size);\n Assert.assertArrayEquals(print...
{ "fields": [], "file": "splice_encoding/src/main/java/com/splicemachine/utils/IntArrays.java", "identifier": "IntArrays", "interfaces": "", "methods": [ { "class_method_signature": "IntArrays.IntArrays()", "constructor": true, "full_signature": "private IntArrays()", "identifier"...
{ "body": "public static int[] complementMap(int[] filterMap, int size) {\n // track columns we need to filter\n HashSet<Integer> columnsToFilter = new HashSet<Integer>(filterMap.length);\n // determine the number of columns to filter\n int numMissingFields = 0;\n for (int i=0; i<fi...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_257
{ "fields": [ { "declarator": "config = new ConfigurationBuilder().build(new EmptyConfigurationDefaultsList().addConfig(new TestConfig()),\n new ReflectingConfigurationSource())", "modifier": "private static final", ...
{ "body": "@Test\n public void noErrorWhenOneServerBecomesInactive() throws Exception{\n final List<String> servers = Arrays.asList(\"server1\",\"server2\");\n final String changeId = \"change\";\n TickingClock clock = new IncrementingClock(0);\n\n final TestDDLCommunicator ddlCommunica...
{ "fields": [ { "declarator": "LOG = Logger.getLogger(AsynchronousDDLController.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = Logger.getLogger(AsynchronousDDLController.class);", "type": "Logger", "var_name": "LOG" }, { ...
{ "body": "@Override\n public String notifyMetadataChange(DDLChange change) throws StandardException {\n String changeId = communicator.createChangeNode(change);\n\n long availableTime =maximumWaitTime;\n long elapsedTime = 0;\n Collection<String> finishedServers =Collections.emptyList(...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_48
{ "fields": [], "file": "db-engine/src/test/java/com/splicemachine/db/iapi/types/SQLLongIntTest.java", "identifier": "SQLLongIntTest", "interfaces": "", "superclass": "extends SQLDataValueDescriptorTest" }
{ "body": "@Test\n public void readExternal() throws IOException {\n SQLLongint lint = new SQLLongint();\n MockObjectInput moi = new MockObjectInput();\n moi.isNull = false;\n moi.value = 42L;\n lint.readExternal(moi);\n ...
{ "fields": [ { "declarator": "BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class)", "modifier": "private static final", "original_string": "private static final int BASE_MEMORY_USAGE = ClassSize.estimateBaseFromCatalog( SQLLongint.class);", "type": "int", "var_n...
{ "body": "public void readExternal(ObjectInput in) throws IOException {\n\t\tsetIsNull(in.readBoolean());\n\t\tvalue = in.readLong();\n\t}", "class_method_signature": "SQLLongint.readExternal(ObjectInput in)", "constructor": false, "full_signature": "public void readExternal(ObjectInput in)", "identifier": "...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_191
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/stream/AbstractStreamTest.java", "identifier": "AbstractStreamTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void transform() throws StreamException {\n SumAccumulator accumulator = new SumAccumulator();\n new IntegerStream().transform(new NegateTransformer()).forEach(accumulator);\n assertEquals(-45, accumulator.sum);\n }", "class_method_signature": "AbstractStreamTest...
{ "fields": [], "file": "utilities/src/main/java/com/splicemachine/stream/AbstractStream.java", "identifier": "AbstractStream", "interfaces": "implements Stream<T>", "methods": [ { "class_method_signature": "AbstractStream.transform(Transformer<T, V> transformer)", "constructor": false, ...
{ "body": "@Override\n public <V> Stream<V> transform(Transformer<T, V> transformer) {\n return new TransformingStream<>(this,transformer);\n }", "class_method_signature": "AbstractStream.transform(Transformer<T, V> transformer)", "constructor": false, "full_signature": "@Override public Stream<V> ...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...
8582237_200
{ "fields": [], "file": "utilities/src/test/java/com/splicemachine/uuid/SnowflakeTest.java", "identifier": "SnowflakeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testcanCreateAUUID() throws Exception {\n Snowflake snowflake = new Snowflake((short)(1<<6));\n long uuid = snowflake.nextUUID();\n Assert.assertTrue(uuid != 0); //uuids should never == 0 unless the tiemstamp is all kinds of off.\n }", "class_method_signatur...
{ "fields": [ { "declarator": "TIMESTAMP_MASK = 0x1ffffffffffl", "modifier": "public static final", "original_string": "public static final long TIMESTAMP_MASK = 0x1ffffffffffl;", "type": "long", "var_name": "TIMESTAMP_MASK" }, { "declarator": "TIMESTAMP_SHIFT = 12", ...
{ "body": "public long nextUUID(){\n long timestamp;\n /*\n * Get the timestamp to use.\n *\n * There are several reasons why we have to check against the latest timestamp:\n *\n * 1. Prevent duplicate UUIDs because we ask for too many UUID...
{ "created": "3/5/2013 3:07:56 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 8582237, "size": null, "stargazer_count": null, "stars": 128, "updates": "2020-01-23T21:06:43+00:00", "url": "https://github.com/splicemachine/spli...