id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
166515022_1164
{ "fields": [ { "declarator": "CATALOG_NAME = \"catalog\"", "modifier": "private static final", "original_string": "private static final String CATALOG_NAME = \"catalog\";", "type": "String", "var_name": "CATALOG_NAME" }, { "declarator": "PARENT_TABLE = new ConnectorTab...
{ "body": "@Test\n public void testCreateTableNotExistsFalse()\n {\n CreateTable statement = new CreateTable(QualifiedName.of(\"test_table\"),\n ImmutableList.of(new ColumnDefinition(identifier(\"a\"), toSqlType(BIGINT), true, emptyList(), Optional.empty())),\n false,\n ...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/CreateTableTask.java", "identifier": "CreateTableTask", "interfaces": "implements DataDefinitionTask<CreateTable>", "methods": [ { "class_method_signature": "CreateTableTask.getName()", "constructor": false, "full_...
{ "body": "@VisibleForTesting\n ListenableFuture<?> internalExecute(CreateTable statement, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters)\n {\n checkArgument(!statement.getElements().isEmpty(), \"no columns for table\");\n\n Map<NodeRef<Parameter>, Ex...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1246
{ "fields": [ { "declarator": "SHORT_DECIMAL = createDecimalType(5, 2)", "modifier": "private static final", "original_string": "private static final Type SHORT_DECIMAL = createDecimalType(5, 2);", "type": "Type", "var_name": "SHORT_DECIMAL" }, { "declarator": "LONG_DEC...
{ "body": "@Test\n public void testBoolean()\n {\n assertEquals(getDomain(BOOLEAN, 0, null), none(BOOLEAN));\n assertEquals(getDomain(BOOLEAN, 10, null), all(BOOLEAN));\n\n assertEquals(getDomain(BOOLEAN, 0, booleanColumnStats(null, null)), none(BOOLEAN));\n assertEquals(getDomain(BO...
{ "fields": [ { "declarator": "columnDomains", "modifier": "private final", "original_string": "private final List<ColumnDomain> columnDomains;", "type": "List<ColumnDomain>", "var_name": "columnDomains" }, { "declarator": "orcBloomFiltersEnabled", "modifier": "pr...
{ "body": "@VisibleForTesting\n public static Domain getDomain(Type type, long rowCount, ColumnStatistics columnStatistics)\n {\n if (rowCount == 0) {\n return Domain.none(type);\n }\n\n if (columnStatistics == null) {\n return Domain.all(type);\n }\n\n i...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_449
{ "fields": [ { "declarator": "MAX_DECIMAL = unscaledDecimal(MAX_DECIMAL_UNSCALED_VALUE)", "modifier": "private static final", "original_string": "private static final Slice MAX_DECIMAL = unscaledDecimal(MAX_DECIMAL_UNSCALED_VALUE);", "type": "Slice", "var_name": "MAX_DECIMAL" },...
{ "body": "@Test\n public void testMultiply256()\n {\n assertMultiply256(MAX_DECIMAL, MAX_DECIMAL, wrappedLongArray(0xECEBBB8000000001L, 0xE0FF0CA0BC87870BL, 0x0764B4ABE8652978L, 0x161BCCA7119915B5L));\n assertMultiply256(MIN_DECIMAL, MIN_DECIMAL, wrappedLongArray(0xECEBBB8000000001L, 0xE0FF0CA0BC...
{ "fields": [ { "declarator": "NUMBER_OF_LONGS = 2", "modifier": "private static final", "original_string": "private static final int NUMBER_OF_LONGS = 2;", "type": "int", "var_name": "NUMBER_OF_LONGS" }, { "declarator": "NUMBER_OF_INTS = 2 * NUMBER_OF_LONGS", "mo...
{ "body": "public static void multiply256(Slice left, Slice right, Slice result)\n {\n checkArgument(result.length() >= NUMBER_OF_LONGS * Long.BYTES * 2);\n\n long l0 = toUnsignedLong(getInt(left, 0));\n long l1 = toUnsignedLong(getInt(left, 1));\n long l2 = toUnsignedLong(getInt(left, ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1
{ "fields": [ { "declarator": "QUERY_RESULTS_CODEC = jsonCodec(QueryResults.class)", "modifier": "private static final", "original_string": "private static final JsonCodec<QueryResults> QUERY_RESULTS_CODEC = jsonCodec(QueryResults.class);", "type": "JsonCodec<QueryResults>", "var_nam...
{ "body": "@Test\n public void testCompatibility()\n {\n String goldenValue = \"{\\n\" +\n \" \\\"id\\\" : \\\"20160128_214710_00012_rk68b\\\",\\n\" +\n \" \\\"infoUri\\\" : \\\"http://localhost:54855/query.html?20160128_214710_00012_rk68b\\\",\\n\" +\n \" ...
{ "fields": [ { "declarator": "id", "modifier": "private final", "original_string": "private final String id;", "type": "String", "var_name": "id" }, { "declarator": "infoUri", "modifier": "private final", "original_string": "private final URI infoUri;", ...
{ "body": "@JsonProperty\n @Override\n public String getId()\n {\n return id;\n }", "class_method_signature": "QueryResults.getId()", "constructor": false, "full_signature": "@JsonProperty @Override public String getId()", "identifier": "getId", "invocations": [], "modifiers": "@JsonPro...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1180
{ "fields": [ { "declarator": "TASK_INSTANCE_ID = \"task-instance-id\"", "modifier": "private static final", "original_string": "private static final String TASK_INSTANCE_ID = \"task-instance-id\";", "type": "String", "var_name": "TASK_INSTANCE_ID" }, { "declarator": "T...
{ "body": "@Test\n public void testDuplicateRequests()\n {\n PartitionedOutputBuffer buffer = createPartitionedBuffer(\n createInitialEmptyOutputBuffers(PARTITIONED)\n .withBuffer(FIRST, 0)\n .withNoMoreBufferIds(),\n sizeOfPages...
{ "fields": [ { "declarator": "state", "modifier": "private final", "original_string": "private final StateMachine<BufferState> state;", "type": "StateMachine<BufferState>", "var_name": "state" }, { "declarator": "outputBuffers", "modifier": "private final", ...
{ "body": "@Override\n public ListenableFuture<BufferResult> get(OutputBufferId outputBufferId, long startingSequenceId, DataSize maxSize)\n {\n requireNonNull(outputBufferId, \"outputBufferId is null\");\n checkArgument(maxSize.toBytes() > 0, \"maxSize must be at least 1 byte\");\n\n retur...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_330
{ "fields": [], "file": "presto-jdbc/src/test/java/io/prestosql/jdbc/TestPrestoDriverUri.java", "identifier": "TestPrestoDriverUri", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUriWithSslEnabled()\n throws SQLException\n {\n PrestoDriverUri parameters = createDriverUri(\"presto://localhost:8080/blackhole?SSL=true\");\n assertUriPortScheme(parameters, 8080, \"https\");\n\n Properties properties = parameters.getPropertie...
{ "fields": [ { "declarator": "JDBC_URL_START = \"jdbc:\"", "modifier": "private static final", "original_string": "private static final String JDBC_URL_START = \"jdbc:\";", "type": "String", "var_name": "JDBC_URL_START" }, { "declarator": "QUERY_SPLITTER = Splitter.on(...
{ "body": "public Properties getProperties()\n {\n return properties;\n }", "class_method_signature": "PrestoDriverUri.getProperties()", "constructor": false, "full_signature": "public Properties getProperties()", "identifier": "getProperties", "invocations": [], "modifiers": "public", "par...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_760
{ "fields": [ { "declarator": "TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE)", "modifier": "private static final", "original_string": "private static final List<Type> TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE);", "type": "List<Type>", "var_name": "TYPES" } ], "file": "pr...
{ "body": "@Test\n public void testMinRowCountThresholdWithLazyPages()\n {\n Page page = createSequencePage(TYPES, 10);\n\n LazyBlock channel1 = lazyWrapper(page.getBlock(0));\n LazyBlock channel2 = lazyWrapper(page.getBlock(1));\n LazyBlock channel3 = lazyWrapper(page.getBlock(2));\...
{ "fields": [ { "declarator": "MAX_MIN_PAGE_SIZE = 1024 * 1024", "modifier": "private static final", "original_string": "private static final int MAX_MIN_PAGE_SIZE = 1024 * 1024;", "type": "int", "var_name": "MAX_MIN_PAGE_SIZE" } ], "file": "presto-main/src/main/java/io/prest...
{ "body": "private MergePages() {}", "class_method_signature": "MergePages.MergePages()", "constructor": true, "full_signature": "private MergePages()", "identifier": "MergePages", "invocations": [], "modifiers": "private", "parameters": "()", "return": "", "signature": " MergePages()", "testcase...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_275
{ "fields": [ { "declarator": "prometheusHttpServer", "modifier": "private", "original_string": "private PrometheusHttpServer prometheusHttpServer;", "type": "PrometheusHttpServer", "var_name": "prometheusHttpServer" }, { "declarator": "split = new PrometheusSplit(URI.c...
{ "body": "@Test\n public void testQueryWithTableNameNeedingURLEncodeInSplits()\n throws URISyntaxException\n {\n Instant now = LocalDateTime.of(2019, 10, 2, 7, 26, 56, 0).toInstant(UTC);\n PrometheusConnectorConfig config = getCommonConfig(prometheusHttpServer.resolve(\"/prometheus-dat...
{ "fields": [ { "declarator": "uri", "modifier": "private final", "original_string": "private final URI uri;", "type": "URI", "var_name": "uri" }, { "declarator": "addresses", "modifier": "private final", "original_string": "private final List<HostAddress> a...
{ "body": "@JsonProperty\n public URI getUri()\n {\n return uri;\n }", "class_method_signature": "PrometheusSplit.getUri()", "constructor": false, "full_signature": "@JsonProperty public URI getUri()", "identifier": "getUri", "invocations": [], "modifiers": "@JsonProperty public", "param...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_625
{ "fields": [ { "declarator": "TYPE_OPERATORS_CACHE = new TypeOperators()", "modifier": "private static final", "original_string": "private static final TypeOperators TYPE_OPERATORS_CACHE = new TypeOperators();", "type": "TypeOperators", "var_name": "TYPE_OPERATORS_CACHE" } ], ...
{ "body": "@Test\n public void testSortingYields()\n {\n DriverYieldSignal yieldSignal = new DriverYieldSignal();\n yieldSignal.forceYieldForTesting();\n\n List<Type> types = ImmutableList.of(INTEGER);\n WorkProcessor<Page> mergedPages = MergeSortedPages.mergeSortedPages(\n ...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/util/MergeSortedPages.java", "identifier": "MergeSortedPages", "interfaces": "", "methods": [ { "class_method_signature": "MergeSortedPages.MergeSortedPages()", "constructor": true, "full_signature": "private MergeSortedPag...
{ "body": "private MergeSortedPages() {}", "class_method_signature": "MergeSortedPages.MergeSortedPages()", "constructor": true, "full_signature": "private MergeSortedPages()", "identifier": "MergeSortedPages", "invocations": [], "modifiers": "private", "parameters": "()", "return": "", "signature"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1211
{ "fields": [ { "declarator": "executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"-%s\"))", "modifier": "private", "original_string": "private ExecutorService executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"-%s\"));", "type": "...
{ "body": "@Test\n public void testSetIf()\n throws Exception\n {\n StateMachine<State> stateMachine = new StateMachine<>(\"test\", executor, State.BREAKFAST, ImmutableSet.of(State.DINNER));\n assertEquals(stateMachine.get(), State.BREAKFAST);\n\n // false predicate with new stat...
{ "fields": [ { "declarator": "log = Logger.get(StateMachine.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(StateMachine.class);", "type": "Logger", "var_name": "log" }, { "declarator": "name", "modifi...
{ "body": "public boolean setIf(T newState, Predicate<T> predicate)\n {\n checkState(!Thread.holdsLock(lock), \"Cannot set state while holding the lock\");\n requireNonNull(newState, \"newState is null\");\n\n while (true) {\n // check if the current state passes the predicate\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_808
{ "fields": [ { "declarator": "DOUBLE_VALUES = {123, -123, 123.45, -123.45, 0}", "modifier": "private static final", "original_string": "private static final double[] DOUBLE_VALUES = {123, -123, 123.45, -123.45, 0};", "type": "double[]", "var_name": "DOUBLE_VALUES" }, { ...
{ "body": "@Test\n public void testAcos()\n {\n for (double doubleValue : DOUBLE_VALUES) {\n assertFunction(\"acos(\" + doubleValue + \")\", DOUBLE, Math.acos(doubleValue));\n assertFunction(\"acos(REAL '\" + (float) doubleValue + \"')\", DOUBLE, Math.acos((float) doubleValue));\n ...
{ "fields": [ { "declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()", "modifier": "public static final", "original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();", "type": "SqlScalarFunction", "var_name": "DECIMAL_MOD_FUNCTION" ...
{ "body": "@Description(\"Arc cosine\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double acos(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Math.acos(num);\n }", "class_method_signature": "MathFunctions.acos(@SqlType(StandardTypes.DOUBLE) double num)", "con...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_92
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java", "identifier": "TestProtoUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testColumn()\n {\n alluxio.grpc.table.FieldSchema.Builder fieldSchema = TestingAlluxioMetastoreObjects.getTestingFieldSchema();\n Column column = ProtoUtils.fromProto(fieldSchema.build());\n assertTrue(column.getComment().isPresent());\n assertEquals(fi...
{ "fields": [], "file": "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/alluxio/ProtoUtils.java", "identifier": "ProtoUtils", "interfaces": "", "methods": [ { "class_method_signature": "ProtoUtils.ProtoUtils()", "constructor": true, "full_signature": "private ProtoUtils()"...
{ "body": "public static Database fromProto(alluxio.grpc.table.Database db)\n {\n return Database.builder()\n .setDatabaseName(db.getDbName())\n .setLocation(db.hasLocation() ? Optional.of(db.getLocation()) : Optional.empty())\n .setOwnerName(db.getOwnerName())\n...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_737
{ "fields": [ { "declarator": "TDIGEST_EQUALITY = (actualBinary, expectedBinary) -> {\n if (actualBinary == null && expectedBinary == null) {\n return true;\n }\n requireNonNull(actualBinary, \"actual value was null\");\n requireNonNull(expectedBinary, \"expected value...
{ "body": "@Test\n public void testTdigestAggregationFunction()\n {\n List<Double> weights = ImmutableList.of(1.5, 2.0, 1.1, 1.111, 3.5, 4.4, 4.4, 1.0, 9.9, 9.0);\n testAggregation(\n createDoublesBlock(1.0, null, 2.0, null, 3.0, null, 4.0, null, 5.0, null),\n createD...
{ "fields": [ { "declarator": "serializer = StateCompiler.generateStateSerializer(TDigestState.class)", "modifier": "private static final", "original_string": "private static final AccumulatorStateSerializer<TDigestState> serializer = StateCompiler.generateStateSerializer(TDigestState.class);", ...
{ "body": "private TDigestAggregationFunction() {}", "class_method_signature": "TDigestAggregationFunction.TDigestAggregationFunction()", "constructor": true, "full_signature": "private TDigestAggregationFunction()", "identifier": "TDigestAggregationFunction", "invocations": [], "modifiers": "private", ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_367
{ "fields": [], "file": "presto-parser/src/test/java/io/prestosql/sql/tree/TestLikePredicate.java", "identifier": "TestLikePredicate", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetChildren()\n {\n StringLiteral value = new StringLiteral(\"a\");\n StringLiteral pattern = new StringLiteral(\"b\");\n StringLiteral escape = new StringLiteral(\"c\");\n\n assertEquals(new LikePredicate(value, pattern, escape).getChildren(), Immu...
{ "fields": [ { "declarator": "value", "modifier": "private final", "original_string": "private final Expression value;", "type": "Expression", "var_name": "value" }, { "declarator": "pattern", "modifier": "private final", "original_string": "private final E...
{ "body": "@Override\n public List<Node> getChildren()\n {\n ImmutableList.Builder<Node> result = ImmutableList.<Node>builder()\n .add(value)\n .add(pattern);\n\n escape.ifPresent(result::add);\n\n return result.build();\n }", "class_method_signature": "Li...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1092
{ "fields": [ { "declarator": "inputStatistics", "modifier": "private", "original_string": "private PlanNodeStatsEstimate inputStatistics;", "type": "PlanNodeStatsEstimate", "var_name": "inputStatistics" }, { "declarator": "uStats", "modifier": "private", "o...
{ "body": "@Test\n public void testAntiJoin()\n {\n // overlapping ranges\n assertThat(computeAntiJoin(inputStatistics, inputStatistics, u, x))\n .symbolStats(u, stats -> stats\n .lowValue(uStats.getLowValue())\n .highValue(uStats.getHig...
{ "fields": [ { "declarator": "MIN_ANTI_JOIN_FILTER_COEFFICIENT = 0.5", "modifier": "private static final", "original_string": "private static final double MIN_ANTI_JOIN_FILTER_COEFFICIENT = 0.5;", "type": "double", "var_name": "MIN_ANTI_JOIN_FILTER_COEFFICIENT" } ], "file": ...
{ "body": "public static PlanNodeStatsEstimate computeAntiJoin(PlanNodeStatsEstimate sourceStats, PlanNodeStatsEstimate filteringSourceStats, Symbol sourceJoinSymbol, Symbol filteringSourceJoinSymbol)\n {\n return compute(sourceStats, filteringSourceStats, sourceJoinSymbol, filteringSourceJoinSymbol,\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1138
{ "fields": [ { "declarator": "QUERY = \"sql\"", "modifier": "private static final", "original_string": "private static final String QUERY = \"sql\";", "type": "String", "var_name": "QUERY" }, { "declarator": "LOCATION = URI.create(\"fake://fake-query\")", "modifi...
{ "body": "@Test\n public void testUpdateMemoryUsage()\n {\n QueryStateMachine stateMachine = createQueryStateMachine();\n\n stateMachine.updateMemoryUsage(5, 15, 10, 1, 5, 3);\n assertEquals(stateMachine.getPeakUserMemoryInBytes(), 5);\n assertEquals(stateMachine.getPeakTotalMemoryI...
{ "fields": [ { "declarator": "QUERY_STATE_LOG = Logger.get(QueryStateMachine.class)", "modifier": "private static final", "original_string": "private static final Logger QUERY_STATE_LOG = Logger.get(QueryStateMachine.class);", "type": "Logger", "var_name": "QUERY_STATE_LOG" }, ...
{ "body": "public void updateMemoryUsage(\n long deltaUserMemoryInBytes,\n long deltaRevocableMemoryInBytes,\n long deltaTotalMemoryInBytes,\n long taskUserMemoryInBytes,\n long taskRevocableMemoryInBytes,\n long taskTotalMemoryInBytes)\n {\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_388
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSimplifyGeometry()\n {\n // Eliminate unnecessary points on the same line.\n assertFunction(\"ST_AsText(simplify_geometry(ST_GeometryFromText('POLYGON ((1 0, 2 1, 3 1, 3 1, 4 1, 1 0))'), 1.5))\", VARCHAR, \"POLYGON ((1 0, 4 1, 2 1, 1 0))\");\n\n // Use dis...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns a \\\"simplified\\\" version of the given geometry\")\n @ScalarFunction(\"simplify_geometry\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice simplifyGeometry(@SqlType(GEOMETRY_TYPE_NAME) Slice input, @SqlType(DOUBLE) double distanceTolerance)\n {\n if (isNaN...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_672
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java", "identifier": "TestSmallintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToVarchar()\n {\n assertFunction(\"cast(SMALLINT'37' as varchar)\", VARCHAR, \"37\");\n assertFunction(\"cast(SMALLINT'17' as varchar)\", VARCHAR, \"17\");\n }", "class_method_signature": "TestSmallintOperators.testCastToVarchar()", "constructor": fals...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/SmallintOperators.java", "identifier": "SmallintOperators", "interfaces": "", "methods": [ { "class_method_signature": "SmallintOperators.SmallintOperators()", "constructor": true, "full_signature": "private SmallintOp...
{ "body": "@ScalarOperator(CAST)\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice castToVarchar(@SqlType(StandardTypes.SMALLINT) long value)\n {\n // todo optimize me\n return utf8Slice(String.valueOf(value));\n }", "class_method_signature": "SmallintOperator...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_222
{ "fields": [], "file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/security/TestRaptorSecurityConfig.java", "identifier": "TestRaptorSecurityConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(RaptorSecurityConfig.class)\n .setSecuritySystem(\"none\"));\n }", "class_method_signature": "TestRaptorSecurityConfig.testDefaults()", "constructor": false, "full_signature": "@Test public v...
{ "fields": [ { "declarator": "securitySystem = \"none\"", "modifier": "private", "original_string": "private String securitySystem = \"none\";", "type": "String", "var_name": "securitySystem" } ], "file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/...
{ "body": "@Config(\"raptor.security\")\n public RaptorSecurityConfig setSecuritySystem(String securitySystem)\n {\n this.securitySystem = securitySystem;\n return this;\n }", "class_method_signature": "RaptorSecurityConfig.setSecuritySystem(String securitySystem)", "constructor": false, ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1207
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/execution/TestQueryIdGenerator.java", "identifier": "TestQueryIdGenerator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateNextQueryId()\n {\n TestIdGenerator idGenerator = new TestIdGenerator();\n\n long millis = new DateTime(2001, 7, 14, 1, 2, 3, 4, DateTimeZone.UTC).getMillis();\n idGenerator.setNow(millis);\n\n // generate ids to 99,999\n for (int i = 0...
{ "fields": [ { "declarator": "BASE_32 = {\n 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h',\n 'i', 'j', 'k', 'm', 'n', 'p', 'q', 'r',\n 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n '2', '3', '4', '5', '6', '7', '8', '9'}", "modifier": "private static final", "or...
{ "body": "public synchronized QueryId createNextQueryId()\n {\n // only generate 100,000 ids per day\n if (counter > 99_999) {\n // wait for the second to rollover\n while (MILLISECONDS.toSeconds(nowInMillis()) == lastTimeInSeconds) {\n Uninterruptibles.sleepUnin...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_84
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java", "identifier": "TestProtoUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = PrestoException.class)\n public void testTableMissingLayout()\n {\n ProtoUtils.fromProto(TestingAlluxioMetastoreObjects.getTestingTableInfo().clearLayout().build());\n }", "class_method_signature": "TestProtoUtils.testTableMissingLayout()", "constructor": fals...
{ "fields": [], "file": "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/alluxio/ProtoUtils.java", "identifier": "ProtoUtils", "interfaces": "", "methods": [ { "class_method_signature": "ProtoUtils.ProtoUtils()", "constructor": true, "full_signature": "private ProtoUtils()"...
{ "body": "public static Database fromProto(alluxio.grpc.table.Database db)\n {\n return Database.builder()\n .setDatabaseName(db.getDbName())\n .setLocation(db.hasLocation() ? Optional.of(db.getLocation()) : Optional.empty())\n .setOwnerName(db.getOwnerName())\n...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_408
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTEquals()\n {\n assertFunction(\"ST_Equals(ST_GeometryFromText('POINT (50 100)'), ST_GeometryFromText('POINT (150 150)'))\", BOOLEAN, false);\n assertFunction(\"ST_Equals(ST_GeometryFromText('MULTIPOINT (50 100, 50 200)'), ST_GeometryFromText('POINT (50 100)'))\...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@SqlNullable\n @Description(\"Returns TRUE if the given geometries represent the same geometry\")\n @ScalarFunction(\"ST_Equals\")\n @SqlType(BOOLEAN)\n public static Boolean stEquals(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMETRY_TYPE_NAME) Slice right)\n {\n OGCGeometry ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_371
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestBingTileFunctions.java", "identifier": "TestBingTileFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testGeometryToBingTiles()\n throws Exception\n {\n assertGeometryToBingTiles(\"POINT (60 30.12)\", 10, ImmutableList.of(\"1230301230\"));\n assertGeometryToBingTiles(\"POINT (60 30.12)\", 15, ImmutableList.of(\"123030123010121\"));\n assertGeometryT...
{ "fields": [ { "declarator": "TILE_PIXELS = 256", "modifier": "private static final", "original_string": "private static final int TILE_PIXELS = 256;", "type": "int", "var_name": "TILE_PIXELS" }, { "declarator": "MAX_LATITUDE = 85.05112878", "modifier": "private ...
{ "body": "@Description(\"Given a geometry and a zoom level, returns the minimum set of Bing tiles that fully covers that geometry\")\n @ScalarFunction(\"geometry_to_bing_tiles\")\n @SqlType(\"array(\" + BingTileType.NAME + \")\")\n public static Block geometryToBingTiles(@SqlType(GEOMETRY_TYPE_NAME) Slice i...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_721
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/metadata/TestFunctionRegistry.java", "identifier": "TestFunctionRegistry", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = \"\\\\QFunction already registered: custom_add(bigint,bigint):bigint\\\\E\")\n public void testDuplicateFunctions()\n {\n List<SqlFunction> functions = new FunctionListBuilder()\n .scala...
{ "fields": [ { "declarator": "specializedScalarCache", "modifier": "private final", "original_string": "private final Cache<FunctionBinding, ScalarFunctionImplementation> specializedScalarCache;", "type": "Cache<FunctionBinding, ScalarFunctionImplementation>", "var_name": "specializ...
{ "body": "public final synchronized void addFunctions(List<? extends SqlFunction> functions)\n {\n for (SqlFunction function : functions) {\n String name = function.getFunctionMetadata().getSignature().getName();\n if (isOperatorName(name) && !(function instanceof GenericEqualOperator...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_234
{ "fields": [ { "declarator": "dbi", "modifier": "private", "original_string": "private IDBI dbi;", "type": "IDBI", "var_name": "dbi" }, { "declarator": "dummyHandle", "modifier": "private", "original_string": "private Handle dummyHandle;", "type": "Ha...
{ "body": "@Test\n public void testDeleteOldCompletedTransactions()\n {\n TestingDao dao = dbi.onDemand(TestingDao.class);\n ShardDao shardDao = dbi.onDemand(ShardDao.class);\n\n long now = System.currentTimeMillis();\n Timestamp yesterdayStart = new Timestamp(now - HOURS.toMillis(27...
{ "fields": [ { "declarator": "log = Logger.get(ShardCleaner.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(ShardCleaner.class);", "type": "Logger", "var_name": "log" }, { "declarator": "dao", "modifie...
{ "body": "@VisibleForTesting\n void deleteOldCompletedTransactions()\n {\n while (!Thread.currentThread().isInterrupted()) {\n int deleted = dao.deleteOldCompletedTransactions(maxTimestamp(maxCompletedTransactionAge));\n if (deleted < CLEANUP_TRANSACTIONS_BATCH_SIZE) {\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_664
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java", "identifier": "TestSmallintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testAdd()\n {\n assertFunction(\"SMALLINT'37' + SMALLINT'37'\", SMALLINT, (short) (37 + 37));\n assertFunction(\"SMALLINT'37' + SMALLINT'17'\", SMALLINT, (short) (37 + 17));\n assertFunction(\"SMALLINT'17' + SMALLINT'37'\", SMALLINT, (short) (17 + 37));\n ...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/SmallintOperators.java", "identifier": "SmallintOperators", "interfaces": "", "methods": [ { "class_method_signature": "SmallintOperators.SmallintOperators()", "constructor": true, "full_signature": "private SmallintOp...
{ "body": "@ScalarOperator(ADD)\n @SqlType(StandardTypes.SMALLINT)\n public static long add(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right)\n {\n try {\n return Shorts.checkedCast(left + right);\n }\n catch (IllegalArgumentException e) ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1084
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/cost/TestStatisticRange.java", "identifier": "TestStatisticRange", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAddAndSumDistinctValues()\n {\n assertEquals(unboundedRange(NaN).addAndSumDistinctValues(unboundedRange(NaN)), unboundedRange(NaN));\n assertEquals(unboundedRange(NaN).addAndSumDistinctValues(unboundedRange(1)), unboundedRange(NaN));\n assertEquals(unbound...
{ "fields": [ { "declarator": "INFINITE_TO_FINITE_RANGE_INTERSECT_OVERLAP_HEURISTIC_FACTOR = 0.25", "modifier": "private static final", "original_string": "private static final double INFINITE_TO_FINITE_RANGE_INTERSECT_OVERLAP_HEURISTIC_FACTOR = 0.25;", "type": "double", "var_name": ...
{ "body": "public StatisticRange addAndSumDistinctValues(StatisticRange other)\n {\n double newDistinctValues = distinctValues + other.distinctValues;\n return new StatisticRange(minExcludeNaN(low, other.low), maxExcludeNaN(high, other.high), newDistinctValues);\n }", "class_method_signature": "...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1250
{ "fields": [ { "declarator": "SHORT_DECIMAL = createDecimalType(5, 2)", "modifier": "private static final", "original_string": "private static final Type SHORT_DECIMAL = createDecimalType(5, 2);", "type": "Type", "var_name": "SHORT_DECIMAL" }, { "declarator": "LONG_DEC...
{ "body": "@Test\n public void testString()\n {\n assertEquals(getDomain(VARCHAR, 0, null), none(VARCHAR));\n assertEquals(getDomain(VARCHAR, 10, null), all(VARCHAR));\n\n assertEquals(getDomain(VARCHAR, 0, stringColumnStats(null, null, null)), none(VARCHAR));\n assertEquals(getDomai...
{ "fields": [ { "declarator": "columnDomains", "modifier": "private final", "original_string": "private final List<ColumnDomain> columnDomains;", "type": "List<ColumnDomain>", "var_name": "columnDomains" }, { "declarator": "orcBloomFiltersEnabled", "modifier": "pr...
{ "body": "@VisibleForTesting\n public static Domain getDomain(Type type, long rowCount, ColumnStatistics columnStatistics)\n {\n if (rowCount == 0) {\n return Domain.none(type);\n }\n\n if (columnStatistics == null) {\n return Domain.all(type);\n }\n\n i...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_849
{ "fields": [ { "declarator": "TIME_ZONE_KEY = TestingSession.DEFAULT_TIME_ZONE_KEY", "modifier": "protected static final", "original_string": "protected static final TimeZoneKey TIME_ZONE_KEY = TestingSession.DEFAULT_TIME_ZONE_KEY;", "type": "TimeZoneKey", "var_name": "TIME_ZONE_KEY...
{ "body": "@Test\n public void testFromUnixTime()\n {\n DateTime dateTime = new DateTime(2001, 1, 22, 3, 4, 5, 0, DATE_TIME_ZONE);\n double seconds = dateTime.getMillis() / 1000.0;\n assertFunction(\"from_unixtime(\" + seconds + \")\", TIMESTAMP_MILLIS, sqlTimestampOf(dateTime));\n\n ...
{ "fields": [ { "declarator": "DATETIME_FORMATTER_CACHE =\n new ThreadLocalCache<>(100, DateTimeFunctions::createDateTimeFormatter)", "modifier": "private static final", "original_string": "private static final ThreadLocalCache<Slice, DateTimeFormatter> DATETIME_FORMATTER_CACHE =\n ...
{ "body": "@ScalarFunction(\"from_unixtime\")\n @SqlType(\"timestamp(3)\")\n public static long fromUnixTime(@SqlType(StandardTypes.DOUBLE) double unixTime)\n {\n return Math.round(unixTime * MICROSECONDS_PER_SECOND);\n }", "class_method_signature": "DateTimeFunctions.fromUnixTime(@SqlType(Standa...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_776
{ "fields": [ { "declarator": "NON_MERGEABLE_INFO = new SplitOperatorInfo(\"some_info\")", "modifier": "private static final", "original_string": "private static final SplitOperatorInfo NON_MERGEABLE_INFO = new SplitOperatorInfo(\"some_info\");", "type": "SplitOperatorInfo", "var_nam...
{ "body": "@Test\n public void testAdd()\n {\n OperatorStats actual = EXPECTED.add(EXPECTED, EXPECTED);\n\n assertEquals(actual.getStageId(), 0);\n assertEquals(actual.getOperatorId(), 41);\n assertEquals(actual.getOperatorType(), \"test\");\n\n assertEquals(actual.getTotalDri...
{ "fields": [ { "declarator": "stageId", "modifier": "private final", "original_string": "private final int stageId;", "type": "int", "var_name": "stageId" }, { "declarator": "pipelineId", "modifier": "private final", "original_string": "private final int pi...
{ "body": "public OperatorStats add(OperatorStats... operators)\n {\n return add(ImmutableList.copyOf(operators));\n }", "class_method_signature": "OperatorStats.add(OperatorStats... operators)", "constructor": false, "full_signature": "public OperatorStats add(OperatorStats... operators)", "iden...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_326
{ "fields": [], "file": "presto-jdbc/src/test/java/io/prestosql/jdbc/TestPrestoDriverUri.java", "identifier": "TestPrestoDriverUri", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEmptyPassword()\n throws SQLException\n {\n PrestoDriverUri parameters = createDriverUri(\"presto://localhost:8080?password=\");\n assertEquals(parameters.getProperties().getProperty(\"password\"), \"\");\n }", "class_method_signature": "TestPrest...
{ "fields": [ { "declarator": "JDBC_URL_START = \"jdbc:\"", "modifier": "private static final", "original_string": "private static final String JDBC_URL_START = \"jdbc:\";", "type": "String", "var_name": "JDBC_URL_START" }, { "declarator": "QUERY_SPLITTER = Splitter.on(...
{ "body": "public Properties getProperties()\n {\n return properties;\n }", "class_method_signature": "PrestoDriverUri.getProperties()", "constructor": false, "full_signature": "public Properties getProperties()", "identifier": "getProperties", "invocations": [], "modifiers": "public", "par...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1196
{ "fields": [ { "declarator": "PAGES_SERDE = testingPagesSerde()", "modifier": "private static final", "original_string": "private static final PagesSerde PAGES_SERDE = testingPagesSerde();", "type": "PagesSerde", "var_name": "PAGES_SERDE" }, { "declarator": "TASK_INSTA...
{ "body": "@Test\n public void testSharedBufferBlocking()\n {\n SettableFuture<?> blockedFuture = SettableFuture.create();\n MockMemoryReservationHandler reservationHandler = new MockMemoryReservationHandler(blockedFuture);\n AggregatedMemoryContext memoryContext = newRootAggregatedMemoryCo...
{ "fields": [ { "declarator": "taskInstanceId", "modifier": "private final", "original_string": "private final String taskInstanceId;", "type": "String", "var_name": "taskInstanceId" }, { "declarator": "state", "modifier": "private final", "original_string":...
{ "body": "@VisibleForTesting\n OutputBufferMemoryManager getMemoryManager()\n {\n return memoryManager;\n }", "class_method_signature": "BroadcastOutputBuffer.getMemoryManager()", "constructor": false, "full_signature": "@VisibleForTesting OutputBufferMemoryManager getMemoryManager()", "ident...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1179
{ "fields": [ { "declarator": "TASK_INSTANCE_ID = \"task-instance-id\"", "modifier": "private static final", "original_string": "private static final String TASK_INSTANCE_ID = \"task-instance-id\";", "type": "String", "var_name": "TASK_INSTANCE_ID" }, { "declarator": "T...
{ "body": "@Test\n public void testAcknowledge()\n {\n int partitionId = 0;\n PartitionedOutputBuffer buffer = createPartitionedBuffer(\n createInitialEmptyOutputBuffers(PARTITIONED)\n .withBuffer(FIRST, partitionId)\n .withNoMoreBufferI...
{ "fields": [ { "declarator": "state", "modifier": "private final", "original_string": "private final StateMachine<BufferState> state;", "type": "StateMachine<BufferState>", "var_name": "state" }, { "declarator": "outputBuffers", "modifier": "private final", ...
{ "body": "@Override\n public void acknowledge(OutputBufferId outputBufferId, long sequenceId)\n {\n requireNonNull(outputBufferId, \"bufferId is null\");\n\n partitions.get(outputBufferId.getId()).acknowledgePages(sequenceId);\n }", "class_method_signature": "PartitionedOutputBuffer.acknowle...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_633
{ "fields": [ { "declarator": "TYPES = ImmutableList.of(BIGINT, DOUBLE, VARBINARY)", "modifier": "private static final", "original_string": "private static final List<Type> TYPES = ImmutableList.of(BIGINT, DOUBLE, VARBINARY);", "type": "List<Type>", "var_name": "TYPES" }, { ...
{ "body": "@Test\n public void testSpill()\n throws Exception\n {\n assertSpill(false, false);\n }", "class_method_signature": "TestFileSingleStreamSpiller.testSpill()", "constructor": false, "full_signature": "@Test public void testSpill()", "identifier": "testSpill", "invocation...
{ "fields": [ { "declarator": "BUFFER_SIZE = 4 * 1024", "modifier": "@VisibleForTesting\n static final", "original_string": "@VisibleForTesting\n static final int BUFFER_SIZE = 4 * 1024;", "type": "int", "var_name": "BUFFER_SIZE" }, { "declarator": "targetFile", ...
{ "body": "@Override\n public ListenableFuture<?> spill(Iterator<Page> pageIterator)\n {\n requireNonNull(pageIterator, \"pageIterator is null\");\n checkNoSpillInProgress();\n spillInProgress = executor.submit(() -> writePages(pageIterator));\n return spillInProgress;\n }", "cl...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_799
{ "fields": [ { "declarator": "ALL_BYTES", "modifier": "private static final", "original_string": "private static final byte[] ALL_BYTES;", "type": "byte[]", "var_name": "ALL_BYTES" } ], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestVarbinaryFunctions.ja...
{ "body": "@Test\n public void testMd5()\n {\n assertFunction(\"md5(CAST('' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"D41D8CD98F00B204E9800998ECF8427E\"));\n assertFunction(\"md5(CAST('hashme' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"533F6357E0210E67D91F651BC49E1278\"));\n }"...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/VarbinaryFunctions.java", "identifier": "VarbinaryFunctions", "interfaces": "", "methods": [ { "class_method_signature": "VarbinaryFunctions.VarbinaryFunctions()", "constructor": true, "full_signature": "priv...
{ "body": "@Description(\"Compute md5 hash\")\n @ScalarFunction\n @SqlType(StandardTypes.VARBINARY)\n public static Slice md5(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n return computeHash(Hashing.md5(), slice);\n }", "class_method_signature": "VarbinaryFunctions.md5(@SqlType(Standard...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_263
{ "fields": [ { "declarator": "COLUMNS = ImmutableList.of(\n new ColumnInfo(1, TIMESTAMP_MILLIS),\n new ColumnInfo(2, BIGINT),\n new ColumnInfo(3, VARCHAR))", "modifier": "private static final", "original_string": "private static final List<ColumnInfo> COLUMNS = ...
{ "body": "@Test\n public void testGetOrganizationEligibleShards()\n {\n int day1 = 1111;\n int day2 = 2222;\n\n SchemaTableName tableName = new SchemaTableName(\"default\", \"test\");\n metadata.createTable(SESSION, tableMetadataBuilder(tableName)\n .column(\"...
{ "fields": [], "file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/storage/organization/ShardOrganizerUtil.java", "identifier": "ShardOrganizerUtil", "interfaces": "", "methods": [ { "class_method_signature": "ShardOrganizerUtil.ShardOrganizerUtil()", "constructor": ...
{ "body": "public static Collection<ShardIndexInfo> getOrganizationEligibleShards(\n IDBI dbi,\n MetadataDao metadataDao,\n Table tableInfo,\n Collection<ShardMetadata> shards,\n boolean includeSortColumns)\n {\n Map<Long, ShardMetadata> shardsById = un...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_424
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testGeometryFromHadoopShape()\n {\n assertFunction(\"geometry_from_hadoop_shape(null)\", GEOMETRY, null);\n\n // empty geometries\n assertGeometryFromHadoopShape(\"000000000101000000FFFFFFFFFFFFEFFFFFFFFFFFFFFFEFFF\", \"POINT EMPTY\");\n assertGeometryF...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns a Geometry type object from Spatial Framework for Hadoop representation\")\n @ScalarFunction(\"geometry_from_hadoop_shape\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice geometryFromHadoopShape(@SqlType(VARBINARY) Slice input)\n {\n requireNonNull(input, \"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_977
{ "fields": [ { "declarator": "fortyIntegers = ImmutableList.of(\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,\n 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40)", "modifier": "private static final", "or...
{ "body": "@Test\n public void testGroupingOperationSomeBitsSet()\n {\n List<Integer> groupingOrdinals = ImmutableList.of(7, 2, 9, 3, 5);\n List<Set<Integer>> groupingSetOrdinals = ImmutableList.of(ImmutableSet.of(4, 2), ImmutableSet.of(9, 7, 14), ImmutableSet.of(5, 2, 7), ImmutableSet.of(3));\n ...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/planner/GroupingOperationRewriter.java", "identifier": "GroupingOperationRewriter", "interfaces": "", "methods": [ { "class_method_signature": "GroupingOperationRewriter.GroupingOperationRewriter()", "constructor": true, ...
{ "body": "static long calculateGrouping(Set<Integer> groupingSet, List<Integer> columns)\n {\n long grouping = (1L << columns.size()) - 1;\n\n for (int index = 0; index < columns.size(); index++) {\n int column = columns.get(index);\n\n if (groupingSet.contains(column)) {\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_47
{ "fields": [ { "declarator": "ADMIN = user(\"admin\", ImmutableSet.of(\"admin\", \"staff\"))", "modifier": "private static final", "original_string": "private static final ConnectorSecurityContext ADMIN = user(\"admin\", ImmutableSet.of(\"admin\", \"staff\"));", "type": "ConnectorSecurity...
{ "body": "@Test\n public void testTableFilter()\n {\n ConnectorAccessControl accessControl = createAccessControl(\"table-filter.json\");\n Set<SchemaTableName> tables = ImmutableSet.<SchemaTableName>builder()\n .add(new SchemaTableName(\"restricted\", \"any\"))\n .ad...
{ "fields": [ { "declarator": "INFORMATION_SCHEMA_NAME = \"information_schema\"", "modifier": "private static final", "original_string": "private static final String INFORMATION_SCHEMA_NAME = \"information_schema\";", "type": "String", "var_name": "INFORMATION_SCHEMA_NAME" }, ...
{ "body": "@Override\n public Set<SchemaTableName> filterTables(ConnectorSecurityContext context, Set<SchemaTableName> tableNames)\n {\n return tableNames.stream()\n .filter(tableName -> isSchemaOwner(context, tableName.getSchemaName()) || checkAnyTablePermission(context, tableName))\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_832
{ "fields": [ { "declarator": "DOUBLE_VALUES = {123, -123, 123.45, -123.45, 0}", "modifier": "private static final", "original_string": "private static final double[] DOUBLE_VALUES = {123, -123, 123.45, -123.45, 0};", "type": "double[]", "var_name": "DOUBLE_VALUES" }, { ...
{ "body": "@Test\n public void testRadians()\n {\n for (double doubleValue : DOUBLE_VALUES) {\n assertFunction(format(\"radians(%s)\", doubleValue), DOUBLE, Math.toRadians(doubleValue));\n assertFunction(format(\"radians(REAL '%s')\", (float) doubleValue), DOUBLE, Math.toRadians((fl...
{ "fields": [ { "declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()", "modifier": "public static final", "original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();", "type": "SqlScalarFunction", "var_name": "DECIMAL_MOD_FUNCTION" ...
{ "body": "@Description(\"Converts an angle in degrees to radians\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double radians(@SqlType(StandardTypes.DOUBLE) double degrees)\n {\n return Math.toRadians(degrees);\n }", "class_method_signature": "MathFunctions.radians(@Sq...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_998
{ "fields": [ { "declarator": "A = new Symbol(\"a\")", "modifier": "private static final", "original_string": "private static final Symbol A = new Symbol(\"a\");", "type": "Symbol", "var_name": "A" }, { "declarator": "B = new Symbol(\"b\")", "modifier": "private s...
{ "body": "@Test\n public void testRightJoinWithFalseInner()\n {\n List<JoinNode.EquiJoinClause> criteria = ImmutableList.of(new JoinNode.EquiJoinClause(A, D));\n\n Map<Symbol, ColumnHandle> leftAssignments = Maps.filterKeys(scanAssignments, Predicates.in(ImmutableList.of(A, B, C)));\n Tabl...
{ "fields": [ { "declarator": "SYMBOL_MATCHES_EXPRESSION =\n entry -> entry.getValue().equals(entry.getKey().toSymbolReference())", "modifier": "private static final", "original_string": "private static final Predicate<Map.Entry<Symbol, ? extends Expression>> SYMBOL_MATCHES_EXPRESSION...
{ "body": "public Expression extract(Session session, PlanNode node, TypeProvider types, TypeAnalyzer typeAnalyzer)\n {\n return node.accept(new Visitor(domainTranslator, metadata, session, types, typeAnalyzer, useTableProperties), null);\n }", "class_method_signature": "EffectivePredicateExtractor.ext...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_131
{ "fields": [ { "declarator": "TABLE = new SchemaTableName(\"schema\", \"table\")", "modifier": "private static final", "original_string": "private static final SchemaTableName TABLE = new SchemaTableName(\"schema\", \"table\");", "type": "SchemaTableName", "var_name": "TABLE" },...
{ "body": "@Test\n public void testGetPartitionsSample()\n {\n HivePartition p1 = partition(\"p1=string1/p2=1234\");\n HivePartition p2 = partition(\"p1=string2/p2=2345\");\n HivePartition p3 = partition(\"p1=string3/p2=3456\");\n HivePartition p4 = partition(\"p1=string4/p2=4567\");...
{ "fields": [ { "declarator": "log = Logger.get(MetastoreHiveStatisticsProvider.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(MetastoreHiveStatisticsProvider.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@VisibleForTesting\n static List<HivePartition> getPartitionsSample(List<HivePartition> partitions, int sampleSize)\n {\n checkArgument(sampleSize > 0, \"sampleSize is expected to be greater than zero\");\n\n if (partitions.size() <= sampleSize) {\n return partitions;\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_561
{ "fields": [ { "declarator": "codec = JsonCodec.jsonCodec(CassandraSplit.class)", "modifier": "private final", "original_string": "private final JsonCodec<CassandraSplit> codec = JsonCodec.jsonCodec(CassandraSplit.class);", "type": "JsonCodec<CassandraSplit>", "var_name": "codec" ...
{ "body": "@Test\n public void testWhereClause()\n {\n CassandraSplit split;\n split = new CassandraSplit(\n CassandraPartition.UNPARTITIONED_ID,\n \"token(k) >= 0 AND token(k) <= 2\",\n addresses);\n assertEquals(split.getWhereClause(), \" WHERE...
{ "fields": [ { "declarator": "partitionId", "modifier": "private final", "original_string": "private final String partitionId;", "type": "String", "var_name": "partitionId" }, { "declarator": "addresses", "modifier": "private final", "original_string": "pri...
{ "body": "public String getWhereClause()\n {\n if (partitionId.equals(CassandraPartition.UNPARTITIONED_ID)) {\n if (splitCondition != null) {\n return \" WHERE \" + splitCondition;\n }\n else {\n return \"\";\n }\n }\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1102
{ "fields": [ { "declarator": "TEST_HEADERS = new GuavaMultivaluedMap<>(ImmutableListMultimap.<String, String>builder()\n .put(PRESTO_USER, \"testUser\")\n .put(PRESTO_SOURCE, \"testSource\")\n .put(PRESTO_CATALOG, \"testCatalog\")\n .put(PRESTO_SCHEMA, \"testSche...
{ "body": "@Test(expectedExceptions = PrestoException.class)\n public void testInvalidTimeZone()\n {\n MultivaluedMap<String, String> headers = new GuavaMultivaluedMap<>(ImmutableListMultimap.<String, String>builder()\n .put(PRESTO_USER, \"testUser\")\n .put(PRESTO_TIME_ZONE...
{ "fields": [ { "declarator": "transactionManager", "modifier": "private final", "original_string": "private final TransactionManager transactionManager;", "type": "TransactionManager", "var_name": "transactionManager" }, { "declarator": "accessControl", "modifier...
{ "body": "@Override\n public Session createSession(QueryId queryId, SessionContext context)\n {\n Identity identity = context.getIdentity();\n accessControl.checkCanSetUser(identity.getPrincipal(), identity.getUser());\n\n // authenticated identity is not present for HTTP or if authenticat...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_648
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestBigintOperators.java", "identifier": "TestBigintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToVarchar()\n {\n assertFunction(\"cast(37 as varchar)\", VARCHAR, \"37\");\n assertFunction(\"cast(100000000017 as varchar)\", VARCHAR, \"100000000017\");\n }", "class_method_signature": "TestBigintOperators.testCastToVarchar()", "constructor": false,...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/BigintOperators.java", "identifier": "BigintOperators", "interfaces": "", "methods": [ { "class_method_signature": "BigintOperators.BigintOperators()", "constructor": true, "full_signature": "private BigintOperators()"...
{ "body": "@ScalarOperator(CAST)\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice castToVarchar(@SqlType(StandardTypes.BIGINT) long value)\n {\n // todo optimize me\n return utf8Slice(String.valueOf(value));\n }", "class_method_signature": "BigintOperators.ca...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_218
{ "fields": [ { "declarator": "FAILURE_UUID = randomUUID()", "modifier": "private static final", "original_string": "private static final UUID FAILURE_UUID = randomUUID();", "type": "UUID", "var_name": "FAILURE_UUID" }, { "declarator": "CORRUPTION_UUID = randomUUID()", ...
{ "body": "@Test\n public void testFailure()\n throws Exception\n {\n assertEmptyStagingDirectory();\n assertBackupStats(0, 0, 0);\n\n File file = new File(temporary, \"failure\");\n Files.write(\"hello world\", file, UTF_8);\n\n try {\n backupManager.sub...
{ "fields": [ { "declarator": "log = Logger.get(BackupManager.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(BackupManager.class);", "type": "Logger", "var_name": "log" }, { "declarator": "backupStore", ...
{ "body": "public CompletableFuture<?> submit(UUID uuid, File source)\n {\n requireNonNull(uuid, \"uuid is null\");\n requireNonNull(source, \"source is null\");\n\n if (backupStore.isEmpty()) {\n return completedFuture(null);\n }\n\n // TODO: decrement when the runnin...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1047
{ "fields": [ { "declarator": "TPCH_CATALOG = \"tpch\"", "modifier": "private static final", "original_string": "private static final String TPCH_CATALOG = \"tpch\";", "type": "String", "var_name": "TPCH_CATALOG" }, { "declarator": "TPCH_CATALOG_NAME = new CatalogName(T...
{ "body": "@Test(enabled = false) // TODO: need to support widening conversion for numbers\n public void testInWithNumericTypes()\n {\n analyze(\"SELECT * FROM t1 WHERE 1 IN (1, 2, 3.5)\");\n }", "class_method_signature": "TestAnalyzer.testInWithNumericTypes()", "constructor": false, "full_signa...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "sqlParser", "modifier": "private final", "original_string": "private ...
{ "body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }", "class_method_signature": "Analyzer.analyze(Statement statement)", "constructor": false, "full_signature": "public Analysis analyze(Statement statement)", "identifier": "analyze", "invocations"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_920
{ "fields": [ { "declarator": "C_BIGINT = new Symbol(\"c_bigint\")", "modifier": "private static final", "original_string": "private static final Symbol C_BIGINT = new Symbol(\"c_bigint\");", "type": "Symbol", "var_name": "C_BIGINT" }, { "declarator": "C_DOUBLE = new Sy...
{ "body": "@Test\n public void testFromOrPredicate()\n {\n Expression originalPredicate = or(\n and(greaterThan(C_BIGINT, bigintLiteral(1L)), unprocessableExpression1(C_BIGINT)),\n and(lessThan(C_BIGINT, bigintLiteral(5L)), unprocessableExpression2(C_BIGINT)));\n Extr...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "literalEncoder", "modifier": "private final", "original_string": "pri...
{ "body": "public static ExtractionResult fromPredicate(\n Metadata metadata,\n TypeOperators typeOperators,\n Session session,\n Expression predicate,\n TypeProvider types)\n {\n return new Visitor(metadata, typeOperators, session, types, new TypeAnaly...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_189
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/rubix/TestRubixEnabledConfig.java", "identifier": "TestRubixEnabledConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"hive.cache.enabled\", \"true\")\n .build();\n\n RubixEnabledConfig expected = new RubixEnabledConfig()\n ...
{ "fields": [ { "declarator": "cacheEnabled", "modifier": "private", "original_string": "private boolean cacheEnabled;", "type": "boolean", "var_name": "cacheEnabled" } ], "file": "presto-hive/src/main/java/io/prestosql/plugin/hive/rubix/RubixEnabledConfig.java", "identifie...
{ "body": "@Config(\"hive.cache.enabled\")\n @ConfigDescription(\"Experimental: Cache HDFS file segments to distributed local storage\")\n public RubixEnabledConfig setCacheEnabled(boolean value)\n {\n this.cacheEnabled = value;\n return this;\n }", "class_method_signature": "RubixEnabledC...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_473
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestEquatableValueSet.java", "identifier": "TestEquatableValueSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSubtract()\n {\n assertEquals(EquatableValueSet.all(ID).subtract(EquatableValueSet.all(ID)), EquatableValueSet.none(ID));\n assertEquals(EquatableValueSet.all(ID).subtract(EquatableValueSet.none(ID)), EquatableValueSet.all(ID));\n assertEquals(EquatableVal...
{ "fields": [ { "declarator": "type", "modifier": "private final", "original_string": "private final Type type;", "type": "Type", "var_name": "type" }, { "declarator": "inclusive", "modifier": "private final", "original_string": "private final boolean inclus...
{ "body": "private static <T> Set<T> subtract(Set<T> set1, Set<T> set2)\n {\n return set1.stream()\n .filter(value -> !set2.contains(value))\n .collect(toLinkedSet());\n }", "class_method_signature": "EquatableValueSet.subtract(Set<T> set1, Set<T> set2)", "constructor": ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_536
{ "fields": [ { "declarator": "ENVIRONMENT = \"test\"", "modifier": "private static final", "original_string": "private static final String ENVIRONMENT = \"test\";", "type": "String", "var_name": "ENVIRONMENT" }, { "declarator": "EMPTY_RESOURCE_ESTIMATES = new ResourceE...
{ "body": "@Test\n public void testMissing()\n {\n H2DaoProvider daoProvider = setup(\"test_missing\");\n H2ResourceGroupsDao dao = daoProvider.get();\n dao.createResourceGroupsGlobalPropertiesTable();\n dao.createResourceGroupsTable();\n dao.createSelectorsTable();\n d...
{ "fields": [ { "declarator": "log = Logger.get(DbResourceGroupConfigurationManager.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(DbResourceGroupConfigurationManager.class);", "type": "Logger", "var_name": "log" }, ...
{ "body": "@Override\n public void configure(ResourceGroup group, SelectionContext<ResourceGroupIdTemplate> criteria)\n {\n ResourceGroupSpec groupSpec = getMatchingSpec(group, criteria);\n if (groups.putIfAbsent(group.getId(), group) == null) {\n // If a new spec replaces the spec retu...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_166
{ "fields": [ { "declarator": "partitionDirectory", "modifier": "private", "original_string": "private Path partitionDirectory;", "type": "Path", "var_name": "partitionDirectory" }, { "declarator": "rowIdBlock", "modifier": "private", "original_string": "pri...
{ "body": "@Test\n public void testDeletedLocationsAfterMinorCompaction()\n {\n AcidInfo.Builder acidInfoBuilder = AcidInfo.builder(partitionDirectory);\n addDeleteDelta(acidInfoBuilder, 4L, 4L, OptionalInt.empty(), partitionDirectory);\n\n OrcDeletedRows deletedRows = createOrcDeletedRows(...
{ "fields": [ { "declarator": "ORIGINAL_TRANSACTION_INDEX = 0", "modifier": "private static final", "original_string": "private static final int ORIGINAL_TRANSACTION_INDEX = 0;", "type": "int", "var_name": "ORIGINAL_TRANSACTION_INDEX" }, { "declarator": "ROW_ID_INDEX = ...
{ "body": "public MaskDeletedRowsFunction getMaskDeletedRowsFunction(Page sourcePage, OptionalLong startRowId)\n {\n return new MaskDeletedRows(sourcePage, startRowId);\n }", "class_method_signature": "OrcDeletedRows.getMaskDeletedRowsFunction(Page sourcePage, OptionalLong startRowId)", "constructor"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_10
{ "fields": [ { "declarator": "config", "modifier": "private", "original_string": "private DbSessionPropertyManagerConfig config;", "type": "DbSessionPropertyManagerConfig", "var_name": "config" }, { "declarator": "dao", "modifier": "private", "original_stri...
{ "body": "@Test\n public void testReloads()\n {\n SessionConfigurationContext context1 = new SessionConfigurationContext(\"foo123\", Optional.of(\"src1\"), ImmutableSet.of(), Optional.empty(), TEST_RG);\n\n dao.insertSpecRow(1, \"foo.*\", null, null, null, 0);\n dao.insertSessionProperty(1...
{ "fields": [ { "declarator": "specsProvider", "modifier": "private final", "original_string": "private final DbSpecsProvider specsProvider;", "type": "DbSpecsProvider", "var_name": "specsProvider" } ], "file": "presto-session-property-managers/src/main/java/io/prestosql/plug...
{ "body": "@Override\n public Map<String, String> getSystemSessionProperties(SessionConfigurationContext context)\n {\n List<SessionMatchSpec> sessionMatchSpecs = specsProvider.get();\n\n // later properties override earlier properties\n Map<String, String> combinedProperties = new HashMap<...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_865
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSubstring()\n {\n assertFunction(\"SUBSTR('Quadratically', 5)\", createVarcharType(13), \"ratically\");\n assertFunction(\"SUBSTR('Quadratically', 50)\", createVarcharType(13), \"\");\n assertFunction(\"SUBSTR('Quadratically', -5)\", createVarcharType(13),...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java", "identifier": "StringFunctions", "interfaces": "", "methods": [ { "class_method_signature": "StringFunctions.StringFunctions()", "constructor": true, "full_signature": "private StringF...
{ "body": "@Description(\"Suffix starting at given index\")\n @ScalarFunction(alias = \"substr\")\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice substring(@SqlType(\"varchar(x)\") Slice utf8, @SqlType(StandardTypes.BIGINT) long start)\n {\n if ((start == 0) || utf8....
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1155
{ "fields": [ { "declarator": "STAGE_ID = new StageId(\"query\", 0)", "modifier": "private static final", "original_string": "private static final StageId STAGE_ID = new StageId(\"query\", 0);", "type": "StageId", "var_name": "STAGE_ID" }, { "declarator": "LOCATION = UR...
{ "body": "@Test\n public void testCanceled()\n {\n StageStateMachine stateMachine = createStageStateMachine();\n\n assertTrue(stateMachine.transitionToCanceled());\n assertFinalState(stateMachine, StageState.CANCELED);\n }", "class_method_signature": "TestStageStateMachine.testCancele...
{ "fields": [ { "declarator": "log = Logger.get(StageStateMachine.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(StageStateMachine.class);", "type": "Logger", "var_name": "log" }, { "declarator": "stageId", ...
{ "body": "public boolean transitionToCanceled()\n {\n return stageState.setIf(CANCELED, currentState -> !currentState.isDone());\n }", "class_method_signature": "StageStateMachine.transitionToCanceled()", "constructor": false, "full_signature": "public boolean transitionToCanceled()", "identifie...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1010
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/relational/TestDeterminismEvaluator.java", "identifier": "TestDeterminismEvaluator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDeterminismEvaluator()\n {\n Metadata metadata = createTestMetadataManager();\n DeterminismEvaluator determinismEvaluator = new DeterminismEvaluator(metadata);\n\n CallExpression random = new CallExpression(\n metadata.resolveFunction(Qualif...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" } ], "file": "presto-main/src/main/java/io/prestosql/sql/relational/DeterminismEvaluator.java", "identifi...
{ "body": "public DeterminismEvaluator(Metadata metadata)\n {\n this.metadata = requireNonNull(metadata, \"metadata is null\");\n }", "class_method_signature": "DeterminismEvaluator.DeterminismEvaluator(Metadata metadata)", "constructor": true, "full_signature": "public DeterminismEvaluator(Metada...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_465
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestSortedRangeSet.java", "identifier": "TestSortedRangeSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOverlaps()\n {\n assertTrue(SortedRangeSet.all(BIGINT).overlaps(SortedRangeSet.all(BIGINT)));\n assertFalse(SortedRangeSet.all(BIGINT).overlaps(SortedRangeSet.none(BIGINT)));\n assertTrue(SortedRangeSet.all(BIGINT).overlaps(SortedRangeSet.of(BIGINT, 0L)));...
{ "fields": [ { "declarator": "type", "modifier": "private final", "original_string": "private final Type type;", "type": "Type", "var_name": "type" }, { "declarator": "lowIndexedRanges", "modifier": "private final", "original_string": "private final Navigab...
{ "body": "@Override\n public boolean overlaps(ValueSet other)\n {\n SortedRangeSet otherRangeSet = checkCompatibility(other);\n\n Iterator<Range> iterator1 = lowIndexedRanges.values().iterator();\n Iterator<Range> iterator2 = otherRangeSet.lowIndexedRanges.values().iterator();\n\n i...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_936
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/TestSchedulingOrderVisitor.java", "identifier": "TestSchedulingOrderVisitor", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testJoinOrder()\n {\n PlanBuilder planBuilder = new PlanBuilder(new PlanNodeIdAllocator(), dummyMetadata());\n TableScanNode a = planBuilder.tableScan(emptyList(), emptyMap());\n TableScanNode b = planBuilder.tableScan(emptyList(), emptyMap());\n List<P...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/planner/SchedulingOrderVisitor.java", "identifier": "SchedulingOrderVisitor", "interfaces": "", "methods": [ { "class_method_signature": "SchedulingOrderVisitor.scheduleOrder(PlanNode root)", "constructor": false, "full_...
{ "body": "public static List<PlanNodeId> scheduleOrder(PlanNode root)\n {\n ImmutableList.Builder<PlanNodeId> schedulingOrder = ImmutableList.builder();\n root.accept(new Visitor(schedulingOrder::add), null);\n return schedulingOrder.build();\n }", "class_method_signature": "SchedulingOr...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_873
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testTrim()\n {\n assertFunction(\"TRIM('')\", createVarcharType(0), \"\");\n assertFunction(\"TRIM(' ')\", createVarcharType(3), \"\");\n assertFunction(\"TRIM(' hello ')\", createVarcharType(9), \"hello\");\n assertFunction(\"TRIM(' hello')\", cre...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java", "identifier": "StringFunctions", "interfaces": "", "methods": [ { "class_method_signature": "StringFunctions.StringFunctions()", "constructor": true, "full_signature": "private StringF...
{ "body": "@Description(\"Removes whitespace from the beginning and end of a string\")\n @ScalarFunction\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice trim(@SqlType(\"varchar(x)\") Slice slice)\n {\n return SliceUtf8.trim(slice);\n }", "class_method_signature"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_170
{ "fields": [ { "declarator": "ROW_OF_ROW_VARIABLE = new Variable(\"a\", rowType(field(\"b\", rowType(field(\"c\", INTEGER)))))", "modifier": "private static final", "original_string": "private static final ConnectorExpression ROW_OF_ROW_VARIABLE = new Variable(\"a\", rowType(field(\"b\", rowTyp...
{ "body": "@Test\n public void testExtractSupportedProjectionColumns()\n {\n assertEquals(extractSupportedProjectedColumns(ONE_LEVEL_DEREFERENCE), ImmutableList.of(ONE_LEVEL_DEREFERENCE));\n assertEquals(extractSupportedProjectedColumns(TWO_LEVEL_DEREFERENCE), ImmutableList.of(TWO_LEVEL_DEREFERENC...
{ "fields": [], "file": "presto-hive/src/main/java/io/prestosql/plugin/hive/HiveApplyProjectionUtil.java", "identifier": "HiveApplyProjectionUtil", "interfaces": "", "methods": [ { "class_method_signature": "HiveApplyProjectionUtil.HiveApplyProjectionUtil()", "constructor": true, "full_s...
{ "body": "public static List<ConnectorExpression> extractSupportedProjectedColumns(ConnectorExpression expression)\n {\n requireNonNull(expression, \"expression is null\");\n ImmutableList.Builder<ConnectorExpression> supportedSubExpressions = ImmutableList.builder();\n fillSupportedProjected...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_520
{ "fields": [], "file": "presto-cli/src/test/java/io/prestosql/cli/TestJsonPrinter.java", "identifier": "TestJsonPrinter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testJsonPrintingNoRows()\n throws Exception\n {\n StringWriter writer = new StringWriter();\n List<String> fieldNames = ImmutableList.of(\"first\", \"last\");\n OutputPrinter printer = new JsonPrinter(fieldNames, writer);\n\n printer.finish()...
{ "fields": [ { "declarator": "fieldNames", "modifier": "private final", "original_string": "private final List<String> fieldNames;", "type": "List<String>", "var_name": "fieldNames" }, { "declarator": "writer", "modifier": "private final", "original_string"...
{ "body": "@Override\n public void finish()\n throws IOException\n {\n writer.flush();\n }", "class_method_signature": "JsonPrinter.finish()", "constructor": false, "full_signature": "@Override public void finish()", "identifier": "finish", "invocations": [ "flush" ], "mod...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1143
{ "fields": [ { "declarator": "SQL_PARSER = new SqlParser()", "modifier": "private static final", "original_string": "private static final SqlParser SQL_PARSER = new SqlParser();", "type": "SqlParser", "var_name": "SQL_PARSER" }, { "declarator": "QUERY_PREPARER = new Qu...
{ "body": "@Test\n public void testTooFewParameters()\n {\n Session session = testSessionBuilder()\n .addPreparedStatement(\"my_query\", \"SELECT ? FROM foo where col1 = ?\")\n .build();\n assertPrestoExceptionThrownBy(() -> QUERY_PREPARER.prepareQuery(session, \"EXEC...
{ "fields": [ { "declarator": "sqlParser", "modifier": "private final", "original_string": "private final SqlParser sqlParser;", "type": "SqlParser", "var_name": "sqlParser" } ], "file": "presto-main/src/main/java/io/prestosql/execution/QueryPreparer.java", "identifier": "Q...
{ "body": "public PreparedQuery prepareQuery(Session session, String query)\n throws ParsingException, PrestoException\n {\n Statement wrappedStatement = sqlParser.createStatement(query, createParsingOptions(session));\n return prepareQuery(session, wrappedStatement);\n }", "class_met...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_609
{ "fields": [], "file": "presto-teradata-functions/src/test/java/io/prestosql/teradata/functions/dateformat/TestDateFormatParser.java", "identifier": "TestDateFormatParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInvalidTokenTokenize()\n {\n assertEquals(\n DateFormatParser.tokenize(\"ala\").stream().map(Token::getType).collect(Collectors.toList()),\n asList(DateFormat.UNRECOGNIZED, DateFormat.UNRECOGNIZED, DateFormat.UNRECOGNIZED));\n }", "cla...
{ "fields": [], "file": "presto-teradata-functions/src/main/java/io/prestosql/teradata/functions/dateformat/DateFormatParser.java", "identifier": "DateFormatParser", "interfaces": "", "methods": [ { "class_method_signature": "DateFormatParser.DateFormatParser()", "constructor": true, "fu...
{ "body": "public static List<? extends Token> tokenize(String format)\n {\n DateFormat lexer = new io.prestosql.teradata.functions.DateFormat(new ANTLRInputStream(format));\n return lexer.getAllTokens();\n }", "class_method_signature": "DateFormatParser.tokenize(String format)", "constructor"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_259
{ "fields": [ { "declarator": "MAX_SHARD_ROWS = 100", "modifier": "private static final", "original_string": "private static final long MAX_SHARD_ROWS = 100;", "type": "long", "var_name": "MAX_SHARD_ROWS" }, { "declarator": "MAX_SHARD_SIZE = DataSize.ofBytes(100)", ...
{ "body": "@Test\n public void testBucketedTableCompaction()\n {\n List<ShardIndexInfo> inputShards = ImmutableList.of(\n shardWithBucket(1),\n shardWithBucket(2),\n shardWithBucket(2),\n shardWithBucket(1),\n shardWithBucket(2),\...
{ "fields": [ { "declarator": "maxShardSize", "modifier": "private final", "original_string": "private final DataSize maxShardSize;", "type": "DataSize", "var_name": "maxShardSize" }, { "declarator": "maxShardRows", "modifier": "private final", "original_str...
{ "body": "public Set<OrganizationSet> createCompactionSets(Table tableInfo, Collection<ShardIndexInfo> shards)\n {\n Collection<Collection<ShardIndexInfo>> shardsByDaysBuckets = getShardsByDaysBuckets(tableInfo, shards);\n\n ImmutableSet.Builder<OrganizationSet> compactionSets = ImmutableSet.builder...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1006
{ "fields": [ { "declarator": "typeOperators = new TypeOperators()", "modifier": "private static final", "original_string": "private static final TypeOperators typeOperators = new TypeOperators();", "type": "TypeOperators", "var_name": "typeOperators" }, { "declarator":...
{ "body": "@Test(dataProvider = \"hashEnabledValues\")\n public void testMultiChannel(boolean hashEnabled)\n {\n // compile a single channel hash strategy\n List<Type> types = ImmutableList.of(VARCHAR, VARCHAR, BIGINT, DOUBLE, BOOLEAN, VARCHAR);\n List<Type> joinTypes = ImmutableList.of(VAR...
{ "fields": [ { "declarator": "typeOperators", "modifier": "private final", "original_string": "private final TypeOperators typeOperators;", "type": "TypeOperators", "var_name": "typeOperators" }, { "declarator": "lookupSourceFactories = CacheBuilder.newBuilder()\n ...
{ "body": "public PagesHashStrategyFactory compilePagesHashStrategyFactory(List<Type> types, List<Integer> joinChannels)\n {\n return compilePagesHashStrategyFactory(types, joinChannels, Optional.empty());\n }", "class_method_signature": "JoinCompiler.compilePagesHashStrategyFactory(List<Type> types, L...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_961
{ "fields": [ { "declarator": "idAllocator = new PlanNodeIdAllocator()", "modifier": "private final", "original_string": "private final PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator();", "type": "PlanNodeIdAllocator", "var_name": "idAllocator" } ], "file": "presto...
{ "body": "@Test\n public void testJoinOrder()\n {\n PlanNode plan =\n joinNode(\n joinNode(\n values(\"a\"),\n values(\"b\")),\n values(\"c\"),\n \"a\", \"c\"...
{ "fields": [ { "declarator": "PATTERN = join()", "modifier": "private static final", "original_string": "private static final Pattern<JoinNode> PATTERN = join();", "type": "Pattern<JoinNode>", "var_name": "PATTERN" }, { "declarator": "metadata", "modifier": "priv...
{ "body": "public static List<Integer> getJoinOrder(JoinGraph graph)\n {\n ImmutableList.Builder<PlanNode> joinOrder = ImmutableList.builder();\n\n Map<PlanNodeId, Integer> priorities = new HashMap<>();\n for (int i = 0; i < graph.size(); i++) {\n priorities.put(graph.getNode(i).get...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_432
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/type/TestMapType.java", "identifier": "TestMapType", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMapDisplayName()\n {\n TypeOperators typeOperators = new TypeOperators();\n MapType mapType = new MapType(BIGINT, createVarcharType(42), typeOperators);\n assertEquals(mapType.getDisplayName(), \"map(bigint, varchar(42))\");\n\n mapType = new MapTyp...
{ "fields": [ { "declarator": "EQUAL_CONVENTION = simpleConvention(NULLABLE_RETURN, NEVER_NULL, NEVER_NULL)", "modifier": "private static final", "original_string": "private static final InvocationConvention EQUAL_CONVENTION = simpleConvention(NULLABLE_RETURN, NEVER_NULL, NEVER_NULL);", "t...
{ "body": "@Override\n public String getDisplayName()\n {\n return \"map(\" + keyType.getDisplayName() + \", \" + valueType.getDisplayName() + \")\";\n }", "class_method_signature": "MapType.getDisplayName()", "constructor": false, "full_signature": "@Override public String getDisplayName()", ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_598
{ "fields": [ { "declarator": "tempDirectory", "modifier": "private", "original_string": "private Path tempDirectory;", "type": "Path", "var_name": "tempDirectory" } ], "file": "presto-hive-hadoop2/src/test/java/io/prestosql/plugin/hive/TestHiveHadoop2Plugin.java", "identif...
{ "body": "@Test\n public void testRubixCacheWithNonExistingCacheDirectory()\n {\n Plugin plugin = new HiveHadoop2Plugin();\n ConnectorFactory connectorFactory = Iterables.getOnlyElement(plugin.getConnectorFactories());\n\n assertThatThrownBy(() -> connectorFactory.create(\n ...
{ "fields": [], "file": "presto-hive-hadoop2/src/main/java/io/prestosql/plugin/hive/HiveHadoop2Plugin.java", "identifier": "HiveHadoop2Plugin", "interfaces": "implements Plugin", "methods": [ { "class_method_signature": "HiveHadoop2Plugin.getConnectorFactories()", "constructor": false, "...
{ "body": "@Override\n public Iterable<ConnectorFactory> getConnectorFactories()\n {\n return ImmutableList.of(new HiveConnectorFactory(\"hive-hadoop2\"));\n }", "class_method_signature": "HiveHadoop2Plugin.getConnectorFactories()", "constructor": false, "full_signature": "@Override public Itera...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_577
{ "fields": [ { "declarator": "database", "modifier": "private", "original_string": "private TestingDatabase database;", "type": "TestingDatabase", "var_name": "database" }, { "declarator": "metadata", "modifier": "private", "original_string": "private JdbcM...
{ "body": "@Test\n public void testListSchemaNames()\n {\n assertTrue(metadata.listSchemaNames(SESSION).containsAll(ImmutableSet.of(\"example\", \"tpch\")));\n }", "class_method_signature": "TestJdbcMetadata.testListSchemaNames()", "constructor": false, "full_signature": "@Test public void testL...
{ "fields": [ { "declarator": "SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\"", "modifier": "private static final", "original_string": "private static final String SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\";", "type": "String", "var_name": "SYNTHETIC_COLUMN_NAME_PRE...
{ "body": "@Override\n public List<String> listSchemaNames(ConnectorSession session)\n {\n return ImmutableList.copyOf(jdbcClient.getSchemaNames(JdbcIdentity.from(session)));\n }", "class_method_signature": "JdbcMetadata.listSchemaNames(ConnectorSession session)", "constructor": false, "full_sig...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_127
{ "fields": [ { "declarator": "HTTP_RANGE_NOT_SATISFIABLE = 416", "modifier": "private static final", "original_string": "private static final int HTTP_RANGE_NOT_SATISFIABLE = 416;", "type": "int", "var_name": "HTTP_RANGE_NOT_SATISFIABLE" } ], "file": "presto-hive/src/test/ja...
{ "body": "@Test\n public void testAssumeRoleCredentialsWithExternalId()\n throws Exception\n {\n Configuration config = new Configuration(false);\n config.set(S3_IAM_ROLE, \"role\");\n config.set(S3_EXTERNAL_ID, \"externalId\");\n\n try (PrestoS3FileSystem fs = new Presto...
{ "fields": [ { "declarator": "S3_USER_AGENT_SUFFIX = \"presto\"", "modifier": "public static final", "original_string": "public static final String S3_USER_AGENT_SUFFIX = \"presto\";", "type": "String", "var_name": "S3_USER_AGENT_SUFFIX" }, { "declarator": "S3_USER_AGE...
{ "body": "@Override\n public void initialize(URI uri, Configuration conf)\n throws IOException\n {\n requireNonNull(uri, \"uri is null\");\n requireNonNull(conf, \"conf is null\");\n super.initialize(uri, conf);\n setConf(conf);\n\n try {\n this.uri = ne...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_824
{ "fields": [ { "declarator": "DOUBLE_VALUES = {123, -123, 123.45, -123.45, 0}", "modifier": "private static final", "original_string": "private static final double[] DOUBLE_VALUES = {123, -123, 123.45, -123.45, 0};", "type": "double[]", "var_name": "DOUBLE_VALUES" }, { ...
{ "body": "@Test\n public void testMod()\n {\n for (int left : intLefts) {\n for (int right : intRights) {\n assertFunction(\"mod(\" + left + \", \" + right + \")\", INTEGER, (left % right));\n }\n }\n\n for (int left : intLefts) {\n for (int ...
{ "fields": [ { "declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()", "modifier": "public static final", "original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();", "type": "SqlScalarFunction", "var_name": "DECIMAL_MOD_FUNCTION" ...
{ "body": "@Description(\"Remainder of given quotient\")\n @ScalarFunction\n @SqlType(StandardTypes.BIGINT)\n public static long mod(@SqlType(StandardTypes.BIGINT) long num1, @SqlType(StandardTypes.BIGINT) long num2)\n {\n return num1 % num2;\n }", "class_method_signature": "MathFunctions.mod(...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_51
{ "fields": [ { "declarator": "tester = new JsonFieldDecoderTester(\"seconds-since-epoch\")", "modifier": "private", "original_string": "private JsonFieldDecoderTester tester = new JsonFieldDecoderTester(\"seconds-since-epoch\");", "type": "JsonFieldDecoderTester", "var_name": "teste...
{ "body": "@Test\n public void testDecode()\n {\n tester.assertDecodedAs(\"33701\", TIME, 33_701_000_000_000_000L);\n tester.assertDecodedAs(\"\\\"33701\\\"\", TIME, 33_701_000_000_000_000L);\n tester.assertDecodedAs(\"33701\", TIME_WITH_TIME_ZONE, packTimeWithTimeZone(33_701_000_000_000L, ...
{ "fields": [ { "declarator": "SUPPORTED_TYPES = ImmutableSet.of(TIME, TIME_WITH_TIME_ZONE, TIMESTAMP_MILLIS, TIMESTAMP_WITH_TIME_ZONE)", "modifier": "private static final", "original_string": "private static final Set<Type> SUPPORTED_TYPES = ImmutableSet.of(TIME, TIME_WITH_TIME_ZONE, TIMESTAMP_...
{ "body": "@Override\n public FieldValueProvider decode(JsonNode value)\n {\n return new SecondsSinceEpochJsonValueProvider(value, columnHandle);\n }", "class_method_signature": "SecondsSinceEpochJsonFieldDecoder.decode(JsonNode value)", "constructor": false, "full_signature": "@Override public ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1114
{ "fields": [ { "declarator": "testFile", "modifier": "private", "original_string": "private File testFile;", "type": "File", "var_name": "testFile" } ], "file": "presto-main/src/test/java/io/prestosql/server/security/TestUserMapping.java", "identifier": "TestUserMapping", ...
{ "body": "@Test\n public void testLowercaseUsernameRule()\n throws UserMappingException\n {\n UserMapping userMapping = new UserMapping(ImmutableList.of(new Rule(\"(.*)@EXAMPLE\\\\.COM\", \"$1\", true, UserMapping.Case.LOWER)));\n assertEquals(userMapping.mapUser(\"TEST@EXAMPLE.COM\"),...
{ "fields": [ { "declarator": "rules", "modifier": "private final", "original_string": "private final List<Rule> rules;", "type": "List<Rule>", "var_name": "rules" } ], "file": "presto-main/src/main/java/io/prestosql/server/security/UserMapping.java", "identifier": "UserMap...
{ "body": "public String mapUser(String principal)\n throws UserMappingException\n {\n for (Rule rule : rules) {\n Optional<String> user = rule.mapUser(principal);\n if (user.isPresent()) {\n return user.get();\n }\n }\n\n throw new Us...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1051
{ "fields": [ { "declarator": "TPCH_CATALOG = \"tpch\"", "modifier": "private static final", "original_string": "private static final String TPCH_CATALOG = \"tpch\";", "type": "String", "var_name": "TPCH_CATALOG" }, { "declarator": "TPCH_CATALOG_NAME = new CatalogName(T...
{ "body": "@Test\n public void testCreateTableAsColumns()\n {\n // TODO: validate output\n analyze(\"CREATE TABLE test(a) AS SELECT 123\");\n analyze(\"CREATE TABLE test(a, b) AS SELECT 1, 2\");\n analyze(\"CREATE TABLE test(a) AS (VALUES 1)\");\n\n assertFails(\"CREATE TABLE ...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "sqlParser", "modifier": "private final", "original_string": "private ...
{ "body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }", "class_method_signature": "Analyzer.analyze(Statement statement)", "constructor": false, "full_signature": "public Analysis analyze(Statement statement)", "identifier": "analyze", "invocations"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_296
{ "fields": [], "file": "presto-thrift-api/src/test/java/io/prestosql/plugin/thrift/api/valuesets/TestPrestoThriftRangeValueSet.java", "identifier": "TestPrestoThriftRangeValueSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFromValueSetOfRangesUnbounded()\n {\n PrestoThriftValueSet thriftValueSet = fromValueSet(ValueSet.ofRanges(Range.greaterThanOrEqual(BIGINT, 0L)));\n assertNotNull(thriftValueSet.getRangeValueSet());\n assertEquals(thriftValueSet.getRangeValueSet().getRange...
{ "fields": [ { "declarator": "ranges", "modifier": "private final", "original_string": "private final List<PrestoThriftRange> ranges;", "type": "List<PrestoThriftRange>", "var_name": "ranges" } ], "file": "presto-thrift-api/src/main/java/io/prestosql/plugin/thrift/api/values...
{ "body": "@ThriftField(1)\n public List<PrestoThriftRange> getRanges()\n {\n return ranges;\n }", "class_method_signature": "PrestoThriftRangeValueSet.getRanges()", "constructor": false, "full_signature": "@ThriftField(1) public List<PrestoThriftRange> getRanges()", "identifier": "getRanges",...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1026
{ "fields": [ { "declarator": "TPCH_CATALOG = \"tpch\"", "modifier": "private static final", "original_string": "private static final String TPCH_CATALOG = \"tpch\";", "type": "String", "var_name": "TPCH_CATALOG" }, { "declarator": "TPCH_CATALOG_NAME = new CatalogName(T...
{ "body": "@Test\n public void testJoinOnConstantExpression()\n {\n analyze(\"SELECT * FROM t1 JOIN t2 ON 1 = 1\");\n }", "class_method_signature": "TestAnalyzer.testJoinOnConstantExpression()", "constructor": false, "full_signature": "@Test public void testJoinOnConstantExpression()", "identi...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "sqlParser", "modifier": "private final", "original_string": "private ...
{ "body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }", "class_method_signature": "Analyzer.analyze(Statement statement)", "constructor": false, "full_signature": "public Analysis analyze(Statement statement)", "identifier": "analyze", "invocations"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1163
{ "fields": [ { "declarator": "CATALOG_NAME = \"catalog\"", "modifier": "private static final", "original_string": "private static final String CATALOG_NAME = \"catalog\";", "type": "String", "var_name": "CATALOG_NAME" }, { "declarator": "PARENT_TABLE = new ConnectorTab...
{ "body": "@Test\n public void testCreateTableNotExistsTrue()\n {\n CreateTable statement = new CreateTable(QualifiedName.of(\"test_table\"),\n ImmutableList.of(new ColumnDefinition(identifier(\"a\"), toSqlType(BIGINT), true, emptyList(), Optional.empty())),\n true,\n ...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/CreateTableTask.java", "identifier": "CreateTableTask", "interfaces": "implements DataDefinitionTask<CreateTable>", "methods": [ { "class_method_signature": "CreateTableTask.getName()", "constructor": false, "full_...
{ "body": "@VisibleForTesting\n ListenableFuture<?> internalExecute(CreateTable statement, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters)\n {\n checkArgument(!statement.getElements().isEmpty(), \"no columns for table\");\n\n Map<NodeRef<Parameter>, Ex...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_629
{ "fields": [ { "declarator": "blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde()", "modifier": "private final", "original_string": "private final BlockEncodingSerde blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde();", "type": "BlockEncodingSerd...
{ "body": "@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = \"No free or healthy space available for spill\")\n public void throwsIfNoDiskSpace()\n {\n List<Type> types = ImmutableList.of(BIGINT);\n List<Path> spillPaths = ImmutableList.of(spillPath1.toPath(), s...
{ "fields": [ { "declarator": "log = Logger.get(FileSingleStreamSpillerFactory.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(FileSingleStreamSpillerFactory.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@Override\n public SingleStreamSpiller create(List<Type> types, SpillContext spillContext, LocalMemoryContext memoryContext)\n {\n Optional<SpillCipher> spillCipher = Optional.empty();\n if (spillEncryptionEnabled) {\n spillCipher = Optional.of(new AesSpillCipher());\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_783
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestBitwiseFunctions.java", "identifier": "TestBitwiseFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testBitwiseNot()\n {\n assertFunction(\"bitwise_not(0)\", BIGINT, ~0L);\n assertFunction(\"bitwise_not(-1)\", BIGINT, ~-1L);\n assertFunction(\"bitwise_not(8)\", BIGINT, ~8L);\n assertFunction(\"bitwise_not(-8)\", BIGINT, ~-8L);\n assertFunction(...
{ "fields": [ { "declarator": "TINYINT_MASK = 0b1111_1111L", "modifier": "private static final", "original_string": "private static final long TINYINT_MASK = 0b1111_1111L;", "type": "long", "var_name": "TINYINT_MASK" }, { "declarator": "TINYINT_SIGNED_BIT = 0b1000_0000L...
{ "body": "@Description(\"Bitwise NOT in 2's complement arithmetic\")\n @ScalarFunction\n @SqlType(StandardTypes.BIGINT)\n public static long bitwiseNot(@SqlType(StandardTypes.BIGINT) long num)\n {\n return ~num;\n }", "class_method_signature": "BitwiseFunctions.bitwiseNot(@SqlType(StandardTyp...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_279
{ "fields": [ { "declarator": "prometheusTable = new PrometheusTable(\"tableName\",\n ImmutableList.of(\n new PrometheusColumn(\"labels\", varcharMapType),\n new PrometheusColumn(\"timestamp\", TIMESTAMP_COLUMN_TYPE),\n new PrometheusColumn...
{ "body": "@Test\n public void testColumnMetadata()\n {\n assertEquals(prometheusTable.getColumnsMetadata(), ImmutableList.of(\n new ColumnMetadata(\"labels\", varcharMapType),\n new ColumnMetadata(\"timestamp\", TIMESTAMP_COLUMN_TYPE),\n new ColumnMetadata(\"...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "columns", "modifier": "private final", "original_string": "private final List<Prometh...
{ "body": "public List<ColumnMetadata> getColumnsMetadata()\n {\n return columnsMetadata;\n }", "class_method_signature": "PrometheusTable.getColumnsMetadata()", "constructor": false, "full_signature": "public List<ColumnMetadata> getColumnsMetadata()", "identifier": "getColumnsMetadata", "invo...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_853
{ "fields": [ { "declarator": "TIME_ZONE_KEY = TestingSession.DEFAULT_TIME_ZONE_KEY", "modifier": "protected static final", "original_string": "protected static final TimeZoneKey TIME_ZONE_KEY = TestingSession.DEFAULT_TIME_ZONE_KEY;", "type": "TimeZoneKey", "var_name": "TIME_ZONE_KEY...
{ "body": "@Test\n public void testDateParse()\n {\n assertFunction(\"date_parse('2013', '%Y')\",\n TIMESTAMP_MILLIS,\n sqlTimestampOf(3, 2013, 1, 1, 0, 0, 0, 0));\n assertFunction(\"date_parse('2013-05', '%Y-%m')\",\n TIMESTAMP_MILLIS,\n ...
{ "fields": [ { "declarator": "DATETIME_FORMATTER_CACHE =\n new ThreadLocalCache<>(100, DateTimeFunctions::createDateTimeFormatter)", "modifier": "private static final", "original_string": "private static final ThreadLocalCache<Slice, DateTimeFormatter> DATETIME_FORMATTER_CACHE =\n ...
{ "body": "@ScalarFunction\n @LiteralParameters({\"x\", \"y\"})\n @SqlType(\"timestamp(3)\") // TODO: increase precision?\n public static long dateParse(ConnectorSession session, @SqlType(\"varchar(x)\") Slice dateTime, @SqlType(\"varchar(y)\") Slice formatString)\n {\n DateTimeFormatter formatter ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_26
{ "fields": [ { "declarator": "alice = Identity.forUser(\"alice\").withGroups(ImmutableSet.of(\"staff\")).build()", "modifier": "private static final", "original_string": "private static final Identity alice = Identity.forUser(\"alice\").withGroups(ImmutableSet.of(\"staff\")).build();", "t...
{ "body": "@Test\n public void testTableFilter()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-table-filter.json\");\n Set<SchemaTableName> tables = ImmutableSet.<SchemaTableName>builder()\n .add(new SchemaTableName(\"restricted...
{ "fields": [ { "declarator": "log = Logger.get(FileBasedSystemAccessControl.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(FileBasedSystemAccessControl.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@Override\n public Set<SchemaTableName> filterTables(SystemSecurityContext context, String catalogName, Set<SchemaTableName> tableNames)\n {\n return tableNames.stream()\n .filter(tableName -> isSchemaOwner(context, new CatalogSchemaName(catalogName, tableName.getSchemaName())) ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_150
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/util/TestHiveUtil.java", "identifier": "TestHiveUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetThriftDeserializer()\n {\n Properties schema = new Properties();\n schema.setProperty(SERIALIZATION_LIB, ThriftDeserializer.class.getName());\n schema.setProperty(SERIALIZATION_CLASS, IntString.class.getName());\n schema.setProperty(SERIALIZATION...
{ "fields": [ { "declarator": "PRESTO_VIEW_FLAG = \"presto_view\"", "modifier": "public static final", "original_string": "public static final String PRESTO_VIEW_FLAG = \"presto_view\";", "type": "String", "var_name": "PRESTO_VIEW_FLAG" }, { "declarator": "VIEW_PREFIX =...
{ "body": "public static Deserializer getDeserializer(Configuration configuration, Properties schema)\n {\n String name = getDeserializerClassName(schema);\n\n // for collection delimiter, Hive 1.x, 2.x uses \"colelction.delim\" but Hive 3.x uses \"collection.delim\"\n // see also https://issu...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_500
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestRange.java", "identifier": "TestRange", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOverlaps()\n {\n assertTrue(Range.greaterThan(BIGINT, 1L).overlaps(Range.lessThanOrEqual(BIGINT, 2L)));\n assertFalse(Range.greaterThan(BIGINT, 2L).overlaps(Range.lessThan(BIGINT, 2L)));\n assertTrue(Range.range(BIGINT, 1L, true, 3L, false).overlaps(Range....
{ "fields": [ { "declarator": "low", "modifier": "private final", "original_string": "private final Marker low;", "type": "Marker", "var_name": "low" }, { "declarator": "high", "modifier": "private final", "original_string": "private final Marker high;", ...
{ "body": "public boolean overlaps(Range other)\n {\n checkTypeCompatibility(other);\n return this.getLow().compareTo(other.getHigh()) <= 0 &&\n other.getLow().compareTo(this.getHigh()) <= 0;\n }", "class_method_signature": "Range.overlaps(Range other)", "constructor": false, ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_445
{ "fields": [ { "declarator": "MAX_DECIMAL = unscaledDecimal(MAX_DECIMAL_UNSCALED_VALUE)", "modifier": "private static final", "original_string": "private static final Slice MAX_DECIMAL = unscaledDecimal(MAX_DECIMAL_UNSCALED_VALUE);", "type": "Slice", "var_name": "MAX_DECIMAL" },...
{ "body": "@Test\n public void testRescaleOverflows()\n {\n assertRescaleOverflows(unscaledDecimal(1), 38);\n }", "class_method_signature": "TestUnscaledDecimal128Arithmetic.testRescaleOverflows()", "constructor": false, "full_signature": "@Test public void testRescaleOverflows()", "identifier...
{ "fields": [ { "declarator": "NUMBER_OF_LONGS = 2", "modifier": "private static final", "original_string": "private static final int NUMBER_OF_LONGS = 2;", "type": "int", "var_name": "NUMBER_OF_LONGS" }, { "declarator": "NUMBER_OF_INTS = 2 * NUMBER_OF_LONGS", "mo...
{ "body": "public static Slice unscaledDecimal()\n {\n return Slices.allocate(UNSCALED_DECIMAL_128_SLICE_LENGTH);\n }", "class_method_signature": "UnscaledDecimal128Arithmetic.unscaledDecimal()", "constructor": false, "full_signature": "public static Slice unscaledDecimal()", "identifier": "unsca...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_916
{ "fields": [ { "declarator": "C_BIGINT = new Symbol(\"c_bigint\")", "modifier": "private static final", "original_string": "private static final Symbol C_BIGINT = new Symbol(\"c_bigint\");", "type": "Symbol", "var_name": "C_BIGINT" }, { "declarator": "C_DOUBLE = new Sy...
{ "body": "@Test\n public void testToPredicateNone()\n {\n TupleDomain<Symbol> tupleDomain = withColumnDomains(ImmutableMap.<Symbol, Domain>builder()\n .put(C_BIGINT, Domain.singleValue(BIGINT, 1L))\n .put(C_DOUBLE, Domain.onlyNull(DOUBLE))\n .put(C_VARCHAR, D...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "literalEncoder", "modifier": "private final", "original_string": "pri...
{ "body": "public Expression toPredicate(TupleDomain<Symbol> tupleDomain)\n {\n if (tupleDomain.isNone()) {\n return FALSE_LITERAL;\n }\n\n Map<Symbol, Domain> domains = tupleDomain.getDomains().get();\n return domains.entrySet().stream()\n .map(entry -> toPred...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1071
{ "fields": [ { "declarator": "TPCH_CATALOG = \"tpch\"", "modifier": "private static final", "original_string": "private static final String TPCH_CATALOG = \"tpch\";", "type": "String", "var_name": "TPCH_CATALOG" }, { "declarator": "TPCH_CATALOG_NAME = new CatalogName(T...
{ "body": "@Test\n public void testQuantifiedComparisonExpression()\n {\n analyze(\"SELECT * FROM t1 WHERE t1.a <= ALL (VALUES 10, 20)\");\n assertFails(\"SELECT * FROM t1 WHERE t1.a = ANY (SELECT 1, 2)\")\n .hasErrorCode(NOT_SUPPORTED);\n assertFails(\"SELECT * FROM t1 WHERE...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "sqlParser", "modifier": "private final", "original_string": "private ...
{ "body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }", "class_method_signature": "Analyzer.analyze(Statement statement)", "constructor": false, "full_signature": "public Analysis analyze(Statement statement)", "identifier": "analyze", "invocations"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_691
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java", "identifier": "TestIntegerOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToBoolean()\n {\n assertFunction(\"cast(INTEGER'37' as boolean)\", BOOLEAN, true);\n assertFunction(\"cast(INTEGER'17' as boolean)\", BOOLEAN, true);\n assertFunction(\"cast(INTEGER'0' as boolean)\", BOOLEAN, false);\n }", "class_method_signature"...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/IntegerOperators.java", "identifier": "IntegerOperators", "interfaces": "", "methods": [ { "class_method_signature": "IntegerOperators.IntegerOperators()", "constructor": true, "full_signature": "private IntegerOperato...
{ "body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.BOOLEAN)\n public static boolean castToBoolean(@SqlType(StandardTypes.INTEGER) long value)\n {\n return value != 0;\n }", "class_method_signature": "IntegerOperators.castToBoolean(@SqlType(StandardTypes.INTEGER) long value)", "constructo...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_384
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTDimension()\n {\n assertFunction(\"ST_Dimension(ST_GeometryFromText('POLYGON EMPTY'))\", TINYINT, (byte) 2);\n assertFunction(\"ST_Dimension(ST_GeometryFromText('POLYGON ((1 1, 1 4, 4 4, 4 1))'))\", TINYINT, (byte) 2);\n assertFunction(\"ST_Dimension(ST_...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns the inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension\")\n @ScalarFunction(\"ST_Dimension\")\n @SqlType(TINYINT)\n public static long stDimension(@SqlType(GEOMETRY_TYPE_NAME) Slice input)\n {\n return deseriali...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1134
{ "fields": [ { "declarator": "OUT = new OutputBufferId(0)", "modifier": "public static final", "original_string": "public static final OutputBufferId OUT = new OutputBufferId(0);", "type": "OutputBufferId", "var_name": "OUT" }, { "declarator": "taskExecutor", "mo...
{ "body": "@Test\n public void testCancel()\n {\n SqlTask sqlTask = createInitialTask();\n\n TaskInfo taskInfo = sqlTask.updateTask(TEST_SESSION,\n Optional.of(PLAN_FRAGMENT),\n ImmutableList.of(),\n createInitialEmptyOutputBuffers(PARTITIONED)\n ...
{ "fields": [ { "declarator": "log = Logger.get(SqlTask.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(SqlTask.class);", "type": "Logger", "var_name": "log" }, { "declarator": "taskId", "modifier": "pr...
{ "body": "public TaskInfo cancel()\n {\n taskStateMachine.cancel();\n return getTaskInfo();\n }", "class_method_signature": "SqlTask.cancel()", "constructor": false, "full_signature": "public TaskInfo cancel()", "identifier": "cancel", "invocations": [ "cancel", "getTaskInfo" ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_557
{ "fields": [ { "declarator": "codec = JsonCodec.jsonCodec(CassandraTableHandle.class)", "modifier": "private final", "original_string": "private final JsonCodec<CassandraTableHandle> codec = JsonCodec.jsonCodec(CassandraTableHandle.class);", "type": "JsonCodec<CassandraTableHandle>", ...
{ "body": "@Test\n public void testRoundTrip()\n {\n CassandraTableHandle expected = new CassandraTableHandle(\"schema\", \"table\");\n\n String json = codec.toJson(expected);\n CassandraTableHandle actual = codec.fromJson(json);\n\n assertEquals(actual.getSchemaTableName(), expected...
{ "fields": [ { "declarator": "schemaName", "modifier": "private final", "original_string": "private final String schemaName;", "type": "String", "var_name": "schemaName" }, { "declarator": "tableName", "modifier": "private final", "original_string": "privat...
{ "body": "public SchemaTableName getSchemaTableName()\n {\n return new SchemaTableName(schemaName, tableName);\n }", "class_method_signature": "CassandraTableHandle.getSchemaTableName()", "constructor": false, "full_signature": "public SchemaTableName getSchemaTableName()", "identifier": "getSch...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_107
{ "fields": [ { "declarator": "DEFAULT_CLIENT = createFakeMetastoreClient()", "modifier": "private static final", "original_string": "private static final ThriftMetastoreClient DEFAULT_CLIENT = createFakeMetastoreClient();", "type": "ThriftMetastoreClient", "var_name": "DEFAULT_CLIEN...
{ "body": "@Test\n public void testFallbackHiveMetastoreOnAllTimeOut()\n throws TException\n {\n MetastoreLocator cluster = createMetastoreLocator(CONFIG_WITH_FALLBACK, CLIENTS);\n\n ThriftMetastoreClient metastoreClient1 = cluster.createMetastoreClient(Optional.empty());\n asser...
{ "fields": [ { "declarator": "addresses", "modifier": "private final", "original_string": "private final List<HostAndPort> addresses;", "type": "List<HostAndPort>", "var_name": "addresses" }, { "declarator": "backoffs", "modifier": "private final", "origina...
{ "body": "@Override\n public ThriftMetastoreClient createMetastoreClient(Optional<String> delegationToken)\n throws TException\n {\n List<Integer> indices = backoffs.stream()\n .sorted(Comparator.comparingLong(Backoff::getBackoffDuration))\n .map(backoffs::indexO...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_804
{ "fields": [ { "declarator": "ALL_BYTES", "modifier": "private static final", "original_string": "private static final byte[] ALL_BYTES;", "type": "byte[]", "var_name": "ALL_BYTES" } ], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestVarbinaryFunctions.ja...
{ "body": "@Test\n public void testXxhash64()\n {\n assertFunction(\"xxhash64(CAST('' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"EF46DB3751D8E999\"));\n assertFunction(\"xxhash64(CAST('hashme' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"F9D96E0E1165E892\"));\n }", "class_method...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/VarbinaryFunctions.java", "identifier": "VarbinaryFunctions", "interfaces": "", "methods": [ { "class_method_signature": "VarbinaryFunctions.VarbinaryFunctions()", "constructor": true, "full_signature": "priv...
{ "body": "@Description(\"Compute xxhash64 hash\")\n @ScalarFunction\n @SqlType(StandardTypes.VARBINARY)\n public static Slice xxhash64(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n Slice hash = Slices.allocate(Long.BYTES);\n hash.setLong(0, Long.reverseBytes(XxHash64.hash(slice)));\n...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_71
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildGlueExpressionTupleDomainIsNull()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addDomain(\"col1\", Domain.onlyNull(VarcharType.VARCHAR))\n .build();\n String expression = buildGlueExpression(ImmutableList.o...
{ "fields": [ { "declarator": "NULL_STRING = \"__HIVE_DEFAULT_PARTITION__\"", "modifier": "static final", "original_string": "static final String NULL_STRING = \"__HIVE_DEFAULT_PARTITION__\";", "type": "String", "var_name": "NULL_STRING" }, { "declarator": "GLUE_EXPRESS...
{ "body": "public static String buildGlueExpression(List<String> columnNames, TupleDomain<String> partitionKeysFilter, boolean assumeCanonicalPartitionKeys)\n {\n return buildGlueExpression(columnNames, partitionKeysFilter, assumeCanonicalPartitionKeys, GLUE_EXPRESSION_CHAR_LIMIT);\n }", "class_method_...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_941
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestPruneApplySourceColumns.java", "identifier": "TestPruneApplySourceColumns", "interfaces": "", "superclass": "extends BaseRuleTest" }
{ "body": "@Test\n public void testAllSubquerySymbolsReferenced()\n {\n tester().assertThat(new PruneApplySourceColumns())\n .on(p -> {\n Symbol a = p.symbol(\"a\");\n Symbol subquerySymbol1 = p.symbol(\"subquery_symbol_1\");\n Symbo...
{ "fields": [ { "declarator": "PATTERN = applyNode()", "modifier": "private static final", "original_string": "private static final Pattern<ApplyNode> PATTERN = applyNode();", "type": "Pattern<ApplyNode>", "var_name": "PATTERN" } ], "file": "presto-main/src/main/java/io/prest...
{ "body": "@Override\n public Result apply(ApplyNode applyNode, Captures captures, Context context)\n {\n Set<Symbol> subqueryAssignmentsSymbols = applyNode.getSubqueryAssignments().getExpressions().stream()\n .flatMap(expression -> SymbolsExtractor.extractUnique(expression).stream())\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_412
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTTouches()\n {\n assertFunction(\"ST_Touches(ST_GeometryFromText('POINT (50 100)'), ST_GeometryFromText('POINT (150 150)'))\", BOOLEAN, false);\n assertFunction(\"ST_Touches(ST_GeometryFromText('MULTIPOINT (50 100, 50 200)'), ST_GeometryFromText('POINT (50 100)'...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@SqlNullable\n @Description(\"Returns TRUE if the geometries have at least one point in common, but their interiors do not intersect\")\n @ScalarFunction(\"ST_Touches\")\n @SqlType(BOOLEAN)\n public static Boolean stTouches(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMETRY_TYPE_NAME) S...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_687
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java", "identifier": "TestIntegerOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToSmallint()\n {\n assertFunction(\"cast(INTEGER'37' as smallint)\", SMALLINT, (short) 37);\n assertFunction(\"cast(INTEGER'17' as smallint)\", SMALLINT, (short) 17);\n }", "class_method_signature": "TestIntegerOperators.testCastToSmallint()", "constru...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/IntegerOperators.java", "identifier": "IntegerOperators", "interfaces": "", "methods": [ { "class_method_signature": "IntegerOperators.IntegerOperators()", "constructor": true, "full_signature": "private IntegerOperato...
{ "body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.SMALLINT)\n public static long castToSmallint(@SqlType(StandardTypes.INTEGER) long value)\n {\n try {\n return Shorts.checkedCast(value);\n }\n catch (IllegalArgumentException e) {\n throw new PrestoException...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1067
{ "fields": [ { "declarator": "TPCH_CATALOG = \"tpch\"", "modifier": "private static final", "original_string": "private static final String TPCH_CATALOG = \"tpch\";", "type": "String", "var_name": "TPCH_CATALOG" }, { "declarator": "TPCH_CATALOG_NAME = new CatalogName(T...
{ "body": "@Test\n public void testLambdaWithSubquery()\n {\n assertFails(\"SELECT apply(1, i -> (SELECT 3)) FROM (VALUES 1) t(x)\")\n .hasErrorCode(NOT_SUPPORTED)\n .hasMessageMatching(\".* Lambda expression cannot contain subqueries\");\n assertFails(\"SELECT apply(...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "sqlParser", "modifier": "private final", "original_string": "private ...
{ "body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }", "class_method_signature": "Analyzer.analyze(Statement statement)", "constructor": false, "full_signature": "public Analysis analyze(Statement statement)", "identifier": "analyze", "invocations"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1088
{ "fields": [ { "declarator": "SYMBOL = new Symbol(\"symbol\")", "modifier": "private static final", "original_string": "private static final Symbol SYMBOL = new Symbol(\"symbol\");", "type": "Symbol", "var_name": "SYMBOL" }, { "declarator": "NON_EMPTY_RANGE = openRange...
{ "body": "@Test\n public void testAddRowCount()\n {\n PlanNodeStatsEstimate unknownStats = statistics(NaN, NaN, NaN, StatisticRange.empty());\n PlanNodeStatsEstimate first = statistics(10, NaN, NaN, StatisticRange.empty());\n PlanNodeStatsEstimate second = statistics(20, NaN, NaN, Statisti...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/cost/PlanNodeStatsEstimateMath.java", "identifier": "PlanNodeStatsEstimateMath", "interfaces": "", "methods": [ { "class_method_signature": "PlanNodeStatsEstimateMath.PlanNodeStatsEstimateMath()", "constructor": true, "full_...
{ "body": "public static PlanNodeStatsEstimate addStatsAndSumDistinctValues(PlanNodeStatsEstimate left, PlanNodeStatsEstimate right)\n {\n return addStats(left, right, StatisticRange::addAndSumDistinctValues);\n }", "class_method_signature": "PlanNodeStatsEstimateMath.addStatsAndSumDistinctValues(PlanN...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1122
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/server/TestHttpRequestSessionContext.java", "identifier": "TestHttpRequestSessionContext", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMappedUser()\n {\n MultivaluedMap<String, String> userHeaders = new GuavaMultivaluedMap<>(ImmutableListMultimap.of(PRESTO_USER, \"testUser\"));\n MultivaluedMap<String, String> emptyHeaders = new MultivaluedHashMap<>();\n\n HttpRequestSessionContext contex...
{ "fields": [ { "declarator": "log = Logger.get(HttpRequestSessionContext.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(HttpRequestSessionContext.class);", "type": "Logger", "var_name": "log" }, { "declarat...
{ "body": "@Override\n public Identity getIdentity()\n {\n return identity;\n }", "class_method_signature": "HttpRequestSessionContext.getIdentity()", "constructor": false, "full_signature": "@Override public Identity getIdentity()", "identifier": "getIdentity", "invocations": [], "modifie...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...