id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
166515022_794
{ "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 testFromBigEndian32()\n {\n assertFunction(\"from_big_endian_32(from_hex('00000000'))\", INTEGER, 0);\n assertFunction(\"from_big_endian_32(from_hex('00000001'))\", INTEGER, 1);\n assertFunction(\"from_big_endian_32(from_hex('7FFFFFFF'))\", INTEGER, 2147483647...
{ "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(\"Decode bigint value from a 32-bit 2's complement big endian varbinary\")\n @ScalarFunction(\"from_big_endian_32\")\n @SqlType(StandardTypes.INTEGER)\n public static long fromBigEndian32(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n if (slice.length() != Integer.BYTE...
{ "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_1174
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" }, { "declarator": "executor = newCachedT...
{ "body": "@Test\n public void testStartTransactionExplicitModes()\n {\n Session session = sessionBuilder()\n .setClientTransactionSupport()\n .build();\n TransactionManager transactionManager = createTestTransactionManager();\n QueryStateMachine stateMachine =...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/StartTransactionTask.java", "identifier": "StartTransactionTask", "interfaces": "implements DataDefinitionTask<StartTransaction>", "methods": [ { "class_method_signature": "StartTransactionTask.getName()", "constructor":...
{ "body": "@Override\n public ListenableFuture<?> execute(StartTransaction statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)\n {\n Session session = stateMachine.getSession();\n if (!sessio...
{ "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_813
{ "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 testTruncate()\n {\n // DOUBLE\n String maxDouble = Double.toString(Double.MAX_VALUE);\n String minDouble = Double.toString(-Double.MAX_VALUE);\n assertFunction(\"truncate(17.18E0)\", DOUBLE, 17.0);\n assertFunction(\"truncate(-17.18E0)\", DOUBLE...
{ "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(\"Round to integer by dropping digits after decimal point\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double truncate(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Math.signum(num) * Math.floor(Math.abs(num));\n }", "class_method_sign...
{ "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_66
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildGlueExpressionTupleDomainExtraDomain()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addStringValues(\"col1\", \"2020-01-01\")\n .addStringValues(\"col2\", \"2020-02-20\", \"2020-02-28\")\n .build();...
{ "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_110
{ "fields": [ { "declarator": "IDENTITY = new HiveIdentity(SESSION)", "modifier": "private static final", "original_string": "private static final HiveIdentity IDENTITY = new HiveIdentity(SESSION);", "type": "HiveIdentity", "var_name": "IDENTITY" }, { "declarator": "TES...
{ "body": "@Test\n public void testGetTable()\n {\n assertEquals(mockClient.getAccessCount(), 0);\n assertNotNull(metastore.getTable(IDENTITY, TEST_DATABASE, TEST_TABLE));\n assertEquals(mockClient.getAccessCount(), 1);\n assertNotNull(metastore.getTable(IDENTITY, TEST_DATABASE, TEST...
{ "fields": [ { "declarator": "delegate", "modifier": "protected final", "original_string": "protected final HiveMetastore delegate;", "type": "HiveMetastore", "var_name": "delegate" }, { "declarator": "databaseCache", "modifier": "private final", "original_...
{ "body": "@Override\n public Optional<Table> getTable(HiveIdentity identity, String databaseName, String tableName)\n {\n identity = updateIdentity(identity);\n return get(tableCache, new WithIdentity<>(identity, hiveTableName(databaseName, tableName)));\n }", "class_method_signature": "Cach...
{ "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_540
{ "fields": [ { "declarator": "EMPTY_RESOURCE_ESTIMATES = new ResourceEstimates(Optional.empty(), Optional.empty(), Optional.empty())", "modifier": "private static final", "original_string": "private static final ResourceEstimates EMPTY_RESOURCE_ESTIMATES = new ResourceEstimates(Optional.empty()...
{ "body": "@Test\n public void testMatchByUserGroups()\n {\n ManagerSpec managerSpec = managerSpec(\n resourceGroupSpec(\"group\"),\n ImmutableList.of(selectorSpec(groupIdTemplate(\"group\"))\n .userGroups(\"first matching\", \"second matching\")));\n\...
{ "fields": [ { "declarator": "CODEC = new JsonCodecFactory(\n () -> new ObjectMapperProvider().get().enable(FAIL_ON_UNKNOWN_PROPERTIES))\n .jsonCodec(ManagerSpec.class)", "modifier": "private static final", "original_string": "private static final JsonCodec<ManagerSpec> CO...
{ "body": "@Override\n public Optional<SelectionContext<ResourceGroupIdTemplate>> match(SelectionCriteria criteria)\n {\n return selectors.stream()\n .map(s -> s.match(criteria))\n .filter(Optional::isPresent)\n .map(Optional::get)\n .findFirst(...
{ "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_405
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testStContains()\n {\n assertFunction(\"ST_Contains(ST_GeometryFromText(null), ST_GeometryFromText('POINT (25 25)'))\", BOOLEAN, null);\n assertFunction(\"ST_Contains(ST_GeometryFromText('POINT (20 20)'), ST_GeometryFromText('POINT (25 25)'))\", BOOLEAN, false);\n ...
{ "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 and only if no points of right lie in the exterior of left, and at least one point of the interior of left lies in the interior of right\")\n @ScalarFunction(\"ST_Contains\")\n @SqlType(BOOLEAN)\n public static Boolean stContains(@SqlType(GEOMETRY_T...
{ "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_956
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" } ], "file": "presto-main/src/test/java/io/pres...
{ "body": "@Test\n public void testDoesNotPushProjectionThroughOuterJoin()\n {\n PlanBuilder p = new PlanBuilder(new PlanNodeIdAllocator(), dummyMetadata());\n Symbol a = p.symbol(\"a\");\n Symbol b = p.symbol(\"b\");\n Symbol c = p.symbol(\"c\");\n\n ProjectNode planNode = p....
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/PushProjectionThroughJoin.java", "identifier": "PushProjectionThroughJoin", "interfaces": "", "methods": [ { "class_method_signature": "PushProjectionThroughJoin.pushProjectionThroughJoin(Metadata metadata, Pr...
{ "body": "public static Optional<PlanNode> pushProjectionThroughJoin(Metadata metadata, ProjectNode projectNode, Lookup lookup, PlanNodeIdAllocator planNodeIdAllocator)\n {\n if (!projectNode.getAssignments().getExpressions().stream().allMatch(expression -> isDeterministic(expression, metadata))) {\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_89
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java", "identifier": "TestProtoUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBucketProperty()\n {\n alluxio.grpc.table.layout.hive.HiveBucketProperty.Builder bucketProperty = TestingAlluxioMetastoreObjects.getTestingHiveBucketProperty();\n Optional<HiveBucketProperty> bp = ProtoUtils.fromProto(bucketProperty.build());\n assertTrue(...
{ "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_686
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java", "identifier": "TestIntegerOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToBigint()\n {\n assertFunction(\"cast(INTEGER'37' as bigint)\", BIGINT, 37L);\n assertFunction(\"cast(INTEGER'17' as bigint)\", BIGINT, 17L);\n }", "class_method_signature": "TestIntegerOperators.testCastToBigint()", "constructor": false, "full_sign...
{ "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.BIGINT)\n public static long castToBigint(@SqlType(StandardTypes.INTEGER) long value)\n {\n return value;\n }", "class_method_signature": "IntegerOperators.castToBigint(@SqlType(StandardTypes.INTEGER) long value)", "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_1066
{ "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 testLambdaInSubqueryContext()\n {\n analyze(\"SELECT apply(x, i -> i * i) FROM (SELECT 10 x)\");\n analyze(\"SELECT apply((SELECT 10), i -> i * i)\");\n\n // with capture\n analyze(\"SELECT apply(x, i -> i * x) FROM (SELECT 10 x)\");\n analyze(\"...
{ "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_1089
{ "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 testSubtractRowCount()\n {\n PlanNodeStatsEstimate unknownStats = statistics(NaN, NaN, NaN, StatisticRange.empty());\n PlanNodeStatsEstimate first = statistics(40, NaN, NaN, StatisticRange.empty());\n PlanNodeStatsEstimate second = statistics(10, NaN, NaN, Sta...
{ "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 subtractSubsetStats(PlanNodeStatsEstimate superset, PlanNodeStatsEstimate subset)\n {\n if (superset.isOutputRowCountUnknown() || subset.isOutputRowCountUnknown()) {\n return PlanNodeStatsEstimate.unknown();\n }\n\n double supersetRowCo...
{ "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_1123
{ "fields": [ { "declarator": "client", "modifier": "private", "original_string": "private HttpClient client;", "type": "HttpClient", "var_name": "client" }, { "declarator": "server", "modifier": "private", "original_string": "private TestingPrestoServer ser...
{ "body": "@Test\n public void testGetQueryInfoDispatchFailure()\n {\n String queryId = runToCompletion(\"SELECT\");\n QueryInfo info = getQueryInfo(queryId);\n assertFalse(info.isScheduled());\n assertNotNull(info.getFailureInfo());\n assertEquals(info.getFailureInfo().getErr...
{ "fields": [ { "declarator": "dispatchManager", "modifier": "private final", "original_string": "private final DispatchManager dispatchManager;", "type": "DispatchManager", "var_name": "dispatchManager" }, { "declarator": "accessControl", "modifier": "private fin...
{ "body": "@ResourceSecurity(AUTHENTICATED_USER)\n @GET\n @Path(\"{queryId}\")\n public Response getQueryInfo(@PathParam(\"queryId\") QueryId queryId, @Context HttpServletRequest servletRequest, @Context HttpHeaders httpHeaders)\n {\n requireNonNull(queryId, \"queryId is null\");\n\n Optiona...
{ "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_393
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testLineInterpolatePoints()\n {\n assertFunction(\"line_interpolate_points(ST_GeometryFromText('LINESTRING EMPTY'), 0.5)\", new ArrayType(GEOMETRY), null);\n\n assertLineInterpolatePoints(\"LINESTRING (0 0, 1 1, 10 10)\", 0.0, \"0 0\");\n assertLineInterpolate...
{ "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 an array of Points interpolated along a LineString.\")\n @ScalarFunction(\"line_interpolate_points\")\n @SqlType(\"array(\" + GEOMETRY_TYPE_NAME + \")\")\n public static Block lineInterpolatePoints(\n @SqlType(GEOMETRY_TYPE_NAME) Slice input,\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_669
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java", "identifier": "TestSmallintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToBigint()\n {\n assertFunction(\"cast(SMALLINT'37' as bigint)\", BIGINT, 37L);\n assertFunction(\"cast(SMALLINT'17' as bigint)\", BIGINT, 17L);\n }", "class_method_signature": "TestSmallintOperators.testCastToBigint()", "constructor": false, "full_s...
{ "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 @SqlType(StandardTypes.BIGINT)\n public static long castToBigint(@SqlType(StandardTypes.SMALLINT) long value)\n {\n return value;\n }", "class_method_signature": "SmallintOperators.castToBigint(@SqlType(StandardTypes.SMALLINT) long value)", "constructor": fals...
{ "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_239
{ "fields": [ { "declarator": "temporary", "modifier": "private", "original_string": "private File temporary;", "type": "File", "var_name": "temporary" }, { "declarator": "store", "modifier": "private", "original_string": "private FileStorageService store;",...
{ "body": "@Test\n public void testGetFileSystemPath()\n {\n UUID uuid = UUID.fromString(\"701e1a79-74f7-4f56-b438-b41e8e7d019d\");\n File expected = new File(\"/test\", format(\"70/1e/%s.orc\", uuid));\n assertEquals(getFileSystemPath(new File(\"/test\"), uuid), expected);\n }", "clas...
{ "fields": [ { "declarator": "log = Logger.get(FileStorageService.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(FileStorageService.class);", "type": "Logger", "var_name": "log" }, { "declarator": "HEX_DIRE...
{ "body": "public static File getFileSystemPath(File base, UUID shardUuid)\n {\n String uuid = shardUuid.toString().toLowerCase(ENGLISH);\n return base.toPath()\n .resolve(uuid.substring(0, 2))\n .resolve(uuid.substring(2, 4))\n .resolve(uuid + FILE_EXTENS...
{ "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_556
{ "fields": [ { "declarator": "metadata = new BlackHoleMetadata()", "modifier": "private final", "original_string": "private final BlackHoleMetadata metadata = new BlackHoleMetadata();", "type": "BlackHoleMetadata", "var_name": "metadata" }, { "declarator": "tableProper...
{ "body": "@Test\n public void testCreateTableInNotExistSchema()\n {\n SchemaTableName schemaTableName = new SchemaTableName(\"schema1\", \"test_table\");\n try {\n metadata.beginCreateTable(SESSION, new ConnectorTableMetadata(schemaTableName, ImmutableList.of(), tableProperties), Optio...
{ "fields": [ { "declarator": "SCHEMA_NAME = \"default\"", "modifier": "public static final", "original_string": "public static final String SCHEMA_NAME = \"default\";", "type": "String", "var_name": "SCHEMA_NAME" }, { "declarator": "schemas = new ArrayList<>()", ...
{ "body": "@Override\n public ConnectorOutputTableHandle beginCreateTable(ConnectorSession session, ConnectorTableMetadata tableMetadata, Optional<ConnectorNewTableLayout> layout)\n {\n checkSchemaExists(tableMetadata.getTable().getSchemaName());\n int splitCount = (Integer) tableMetadata.getPrope...
{ "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_106
{ "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 testFallbackHiveMetastoreOnTimeOut()\n throws TException\n {\n MetastoreLocator cluster = createMetastoreLocator(CONFIG_WITH_FALLBACK, CLIENTS);\n\n ThriftMetastoreClient metastoreClient1 = cluster.createMetastoreClient(Optional.empty());\n assertEq...
{ "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_70
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildGlueExpressionExtraColumn()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addStringValues(\"col1\", \"2020-01-01\")\n .build();\n String expression = buildGlueExpression(ImmutableList.of(\"col1\", \"col2\"),...
{ "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_805
{ "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 testCrc32()\n {\n assertFunction(\"crc32(to_utf8('CRC me!'))\", BIGINT, 38028046L);\n assertFunction(\"crc32(to_utf8('1234567890'))\", BIGINT, 639479525L);\n assertFunction(\"crc32(to_utf8(CAST(1234567890 AS VARCHAR)))\", BIGINT, 639479525L);\n assertFu...
{ "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 CRC-32\")\n @ScalarFunction\n @SqlType(StandardTypes.BIGINT)\n public static long crc32(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n CRC32 crc32 = new CRC32();\n crc32.update(slice.toByteBuffer());\n return crc32.getValue();\n }", "class_...
{ "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_940
{ "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 testNotAllSubquerySymbolsReferenced()\n {\n tester().assertThat(new PruneApplySourceColumns())\n .on(p -> {\n Symbol a = p.symbol(\"a\");\n Symbol subquerySymbol1 = p.symbol(\"subquery_symbol_1\");\n Sy...
{ "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_413
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTWithin()\n {\n assertFunction(\"ST_Within(ST_GeometryFromText('POINT (50 100)'), ST_GeometryFromText('POINT (150 150)'))\", BOOLEAN, false);\n assertFunction(\"ST_Within(ST_GeometryFromText('POINT (50 100)'), ST_GeometryFromText('MULTIPOINT (50 100, 50 200)'))\...
{ "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 geometry A is completely inside geometry B\")\n @ScalarFunction(\"ST_Within\")\n @SqlType(BOOLEAN)\n public static Boolean stWithin(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMETRY_TYPE_NAME) Slice right)\n {\n if (!envelopes...
{ "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_1070
{ "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 testAggregationWithOrderBy()\n {\n analyze(\"SELECT array_agg(DISTINCT x ORDER BY x) FROM (VALUES (1, 2), (3, 4)) t(x, y)\");\n analyze(\"SELECT array_agg(x ORDER BY y) FROM (VALUES (1, 2), (3, 4)) t(x, y)\");\n assertFails(\"SELECT array_agg(DISTINCT x ORDER ...
{ "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_690
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java", "identifier": "TestIntegerOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToDouble()\n {\n assertFunction(\"cast(INTEGER'37' as double)\", DOUBLE, 37.0);\n assertFunction(\"cast(INTEGER'17' as double)\", DOUBLE, 17.0);\n }", "class_method_signature": "TestIntegerOperators.testCastToDouble()", "constructor": false, "full_si...
{ "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.DOUBLE)\n public static double castToDouble(@SqlType(StandardTypes.INTEGER) long value)\n {\n return value;\n }", "class_method_signature": "IntegerOperators.castToDouble(@SqlType(StandardTypes.INTEGER) long value)", "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_385
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTIsClosed()\n {\n assertFunction(\"ST_IsClosed(ST_GeometryFromText('LINESTRING (1 1, 2 2, 1 3, 1 1)'))\", BOOLEAN, true);\n assertFunction(\"ST_IsClosed(ST_GeometryFromText('LINESTRING (1 1, 2 2, 1 3)'))\", BOOLEAN, false);\n assertInvalidFunction(\"ST_Is...
{ "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 LineString or Multi-LineString's start and end points are coincident\")\n @ScalarFunction(\"ST_IsClosed\")\n @SqlType(BOOLEAN)\n public static Boolean stIsClosed(@SqlType(GEOMETRY_TYPE_NAME) Slice input)\n {\n OGCGeometry geometry = de...
{ "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_1135
{ "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(timeOut = 30_000)\n public void testAbort()\n throws Exception\n {\n SqlTask sqlTask = createInitialTask();\n\n assertEquals(sqlTask.getTaskStatus().getState(), TaskState.RUNNING);\n assertEquals(sqlTask.getTaskStatus().getVersion(), STARTING_VERSION);\n s...
{ "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 abort()\n {\n taskStateMachine.abort();\n return getTaskInfo();\n }", "class_method_signature": "SqlTask.abort()", "constructor": false, "full_signature": "public TaskInfo abort()", "identifier": "abort", "invocations": [ "abort", "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_27
{ "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 testTableFilterNoAccess()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-no-access.json\");\n\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_852
{ "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 testDateFormat()\n {\n String dateTimeLiteral = \"TIMESTAMP '2001-01-09 13:04:05.321'\";\n\n assertFunction(\"date_format(\" + dateTimeLiteral + \", '%a')\", VARCHAR, \"Tue\");\n assertFunction(\"date_format(\" + dateTimeLiteral + \", '%b')\", VARCHAR, \"Jan\"...
{ "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": "public static Slice dateFormat(ISOChronology chronology, Locale locale, long timestamp, Slice formatString)\n {\n DateTimeFormatter formatter = DATETIME_FORMATTER_CACHE.get(formatString)\n .withChronology(chronology)\n .withLocale(locale);\n\n return utf8Slice...
{ "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_151
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/util/TestHiveUtil.java", "identifier": "TestHiveUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToPartitionValues()\n throws MetaException\n {\n assertToPartitionValues(\"ds=2015-12-30/event_type=QueryCompletion\");\n assertToPartitionValues(\"ds=2015-12-30\");\n assertToPartitionValues(\"a=1/b=2/c=3\");\n assertToPartitionValues(\"...
{ "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 List<String> toPartitionValues(String partitionName)\n {\n // mimics Warehouse.makeValsFromName\n ImmutableList.Builder<String> resultBuilder = ImmutableList.builder();\n int start = 0;\n while (true) {\n while (start < partitionName.length() && parti...
{ "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_501
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestRange.java", "identifier": "TestRange", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIntersect()\n {\n assertEquals(Range.greaterThan(BIGINT, 1L).intersect(Range.lessThanOrEqual(BIGINT, 2L)), Range.range(BIGINT, 1L, false, 2L, true));\n assertEquals(Range.range(BIGINT, 1L, true, 3L, false).intersect(Range.equal(BIGINT, 2L)), Range.equal(BIGINT, 2...
{ "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 Range intersect(Range other)\n {\n checkTypeCompatibility(other);\n if (!this.overlaps(other)) {\n throw new IllegalArgumentException(\"Cannot intersect non-overlapping ranges\");\n }\n Marker lowMarker = Marker.max(low, other.getLow());\n Marker high...
{ "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_444
{ "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 testRescale()\n {\n assertEquals(rescale(unscaledDecimal(10), 0), unscaledDecimal(10L));\n assertEquals(rescale(unscaledDecimal(10), -20), unscaledDecimal(0L));\n assertEquals(rescale(unscaledDecimal(15), -1), unscaledDecimal(2));\n assertEquals(rescale...
{ "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 rescale(Slice decimal, int rescaleFactor)\n {\n if (rescaleFactor == 0) {\n return decimal;\n }\n else {\n Slice result = unscaledDecimal();\n rescale(decimal, rescaleFactor, result);\n return result;\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_917
{ "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 testToPredicate()\n {\n TupleDomain<Symbol> tupleDomain;\n\n tupleDomain = withColumnDomains(ImmutableMap.of(C_BIGINT, Domain.notNull(BIGINT)));\n assertEquals(toPredicate(tupleDomain), isNotNull(C_BIGINT));\n\n tupleDomain = withColumnDomains(Immutable...
{ "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_297
{ "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 testFromValueSetOfRangesBounded()\n {\n PrestoThriftValueSet thriftValueSet = fromValueSet(ValueSet.ofRanges(\n range(BIGINT, -10L, true, -1L, false),\n range(BIGINT, -1L, false, 100L, true)));\n assertNotNull(thriftValueSet.getRangeValu...
{ "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_1027
{ "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 testNonEquiOuterJoin()\n {\n analyze(\"SELECT * FROM t1 LEFT JOIN t2 ON t1.a + t2.a = 1\");\n analyze(\"SELECT * FROM t1 RIGHT JOIN t2 ON t1.a + t2.a = 1\");\n analyze(\"SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a OR t1.b = t2.b\");\n }", "class_method_s...
{ "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_1162
{ "fields": [ { "declarator": "executor", "modifier": "private", "original_string": "private ExecutorService executor;", "type": "ExecutorService", "var_name": "executor" }, { "declarator": "scheduledExecutor", "modifier": "private", "original_string": "priv...
{ "body": "@Test\n public void testIsAnyTaskBlocked()\n {\n NodeTaskMap nodeTaskMap = new NodeTaskMap(new FinalizerService());\n\n StageId stageId = new StageId(new QueryId(\"query\"), 0);\n SqlStageExecution stage = createSqlStageExecution(\n stageId,\n create...
{ "fields": [ { "declarator": "stateMachine", "modifier": "private final", "original_string": "private final StageStateMachine stateMachine;", "type": "StageStateMachine", "var_name": "stateMachine" }, { "declarator": "remoteTaskFactory", "modifier": "private fina...
{ "body": "public boolean isAnyTaskBlocked()\n {\n return getTaskStatuses().stream().anyMatch(TaskStatus::isOutputBufferOverutilized);\n }", "class_method_signature": "SqlStageExecution.isAnyTaskBlocked()", "constructor": false, "full_signature": "public boolean isAnyTaskBlocked()", "identifier":...
{ "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_628
{ "fields": [ { "declarator": "blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde()", "modifier": "private final", "original_string": "private final BlockEncodingSerde blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde();", "type": "BlockEncodingSerd...
{ "body": "@Test\n public void testDistributesSpillOverPathsBadDisk()\n throws Exception\n {\n List<Type> types = ImmutableList.of(BIGINT);\n List<Path> spillPaths = ImmutableList.of(spillPath1.toPath(), spillPath2.toPath());\n FileSingleStreamSpillerFactory spillerFactory = spil...
{ "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_782
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestBitwiseFunctions.java", "identifier": "TestBitwiseFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testBitCount()\n {\n assertFunction(\"bit_count(0, 64)\", BIGINT, 0L);\n assertFunction(\"bit_count(7, 64)\", BIGINT, 3L);\n assertFunction(\"bit_count(24, 64)\", BIGINT, 2L);\n assertFunction(\"bit_count(-8, 64)\", BIGINT, 61L);\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(\"Count number of set bits in 2's complement representation\")\n @ScalarFunction\n @SqlType(StandardTypes.BIGINT)\n public static long bitCount(@SqlType(StandardTypes.BIGINT) long num, @SqlType(StandardTypes.BIGINT) long bits)\n {\n if (bits == 64) {\n return Long...
{ "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_278
{ "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 testQueryDividedIntoSplitsShouldHaveCorrectSpacingBetweenTimes()\n {\n Instant now = LocalDateTime.of(2019, 10, 2, 7, 26, 56, 0).toInstant(UTC);\n PrometheusConnectorConfig config = getCommonConfig(prometheusHttpServer.resolve(\"/prometheus-data/prometheus-metrics.js...
{ "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_1115
{ "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 testUppercaseUsernameRule()\n throws UserMappingException\n {\n UserMapping userMapping = new UserMapping(ImmutableList.of(new Rule(\"(.*)@example\\\\.com\", \"$1\", true, UserMapping.Case.UPPER)));\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_1050
{ "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 testMultipleGroupingSetMultipleColumns()\n {\n // TODO: validate output\n analyze(\"SELECT a, SUM(b) FROM t1 GROUP BY GROUPING SETS ((a, b), (c, d))\");\n analyze(\"SELECT a, SUM(b) FROM t1 GROUP BY a, b, GROUPING SETS ((c, d))\");\n analyze(\"SELECT a,...
{ "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_960
{ "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 testIsOriginalOrder()\n {\n assertTrue(isOriginalOrder(ImmutableList.of(0, 1, 2, 3, 4)));\n assertFalse(isOriginalOrder(ImmutableList.of(0, 2, 1, 3, 4)));\n }", "class_method_signature": "TestEliminateCrossJoins.testIsOriginalOrder()", "constructor": false, ...
{ "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 boolean isOriginalOrder(List<Integer> joinOrder)\n {\n for (int i = 0; i < joinOrder.size(); i++) {\n if (joinOrder.get(i) != i) {\n return false;\n }\n }\n return true;\n }", "class_method_signature": "EliminateCrossJoins.isOr...
{ "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_433
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/type/TestArrayType.java", "identifier": "TestArrayType", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDisplayName()\n {\n ArrayType type = new ArrayType(BOOLEAN);\n assertEquals(type.getDisplayName(), \"array(boolean)\");\n }", "class_method_signature": "TestArrayType.testDisplayName()", "constructor": false, "full_signature": "@Test public void testDisp...
{ "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 ARRAY + \"(\" + elementType.getDisplayName() + \")\";\n }", "class_method_signature": "ArrayType.getDisplayName()", "constructor": false, "full_signature": "@Override public String getDisplayName()", "identifier": "getDisplayNa...
{ "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_599
{ "fields": [], "file": "presto-mongodb/src/test/java/io/prestosql/plugin/mongodb/TestObjectIdFunctions.java", "identifier": "TestObjectIdFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testObjectidTimestamp()\n {\n assertFunction(\n \"objectid_timestamp(ObjectId('1234567890abcdef12345678'))\",\n TIMESTAMP_TZ_MILLIS,\n toTimestampWithTimeZone(ZonedDateTime.of(1979, 9, 5, 22, 51, 36, 0, UTC)));\n }", "class_...
{ "fields": [], "file": "presto-mongodb/src/main/java/io/prestosql/plugin/mongodb/ObjectIdFunctions.java", "identifier": "ObjectIdFunctions", "interfaces": "", "methods": [ { "class_method_signature": "ObjectIdFunctions.ObjectIdFunctions()", "constructor": true, "full_signature": "privat...
{ "body": "@ScalarFunction\n @SqlType(\"timestamp(3) with time zone\") // ObjectId's timestamp is a point in time\n public static long objectidTimestamp(@SqlType(\"ObjectId\") Slice value)\n {\n int epochSeconds = new ObjectId(value.getBytes()).getTimestamp();\n return packDateTimeWithZone(SECO...
{ "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_576
{ "fields": [], "file": "presto-base-jdbc/src/test/java/io/prestosql/plugin/jdbc/TestForwardingJdbcClient.java", "identifier": "TestForwardingJdbcClient", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testProperForwardingMethodsAreCalled()\n {\n assertProperForwardingMethodsAreCalled(JdbcClient.class, jdbcClient -> ForwardingJdbcClient.of(() -> jdbcClient));\n }", "class_method_signature": "TestForwardingJdbcClient.testProperForwardingMethodsAreCalled()", "constru...
{ "fields": [], "file": "presto-base-jdbc/src/main/java/io/prestosql/plugin/jdbc/ForwardingJdbcClient.java", "identifier": "ForwardingJdbcClient", "interfaces": "implements JdbcClient", "methods": [ { "class_method_signature": "ForwardingJdbcClient.of(Supplier<JdbcClient> jdbcClientSupplier)", ...
{ "body": "public static JdbcClient of(Supplier<JdbcClient> jdbcClientSupplier)\n {\n requireNonNull(jdbcClientSupplier, \"jdbcClientSupplier is null\");\n return new ForwardingJdbcClient()\n {\n @Override\n public JdbcClient delegate()\n {\n ret...
{ "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_126
{ "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 testAssumeRoleStaticCredentials()\n throws Exception\n {\n Configuration config = new Configuration(false);\n config.set(S3_ACCESS_KEY, \"test_access_key\");\n config.set(S3_SECRET_KEY, \"test_secret_key\");\n config.set(S3_IAM_ROLE, \"test_r...
{ "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_50
{ "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 testSchemaRulesForCheckCanShowTables()\n {\n ConnectorAccessControl accessControl = createAccessControl(\"visibility.json\");\n accessControl.checkCanShowTables(ADMIN, \"specific-schema\");\n accessControl.checkCanShowTables(ADMIN, \"bob-schema\");\n ac...
{ "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 void checkCanShowTables(ConnectorSecurityContext context, String schemaName)\n {\n if (!checkAnySchemaAccess(context, schemaName)) {\n denyShowTables(schemaName);\n }\n }", "class_method_signature": "FileBasedAccessControl.checkCanShowTables(ConnectorS...
{ "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_825
{ "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 testPi()\n {\n assertFunction(\"pi()\", DOUBLE, Math.PI);\n }", "class_method_signature": "TestMathFunctions.testPi()", "constructor": false, "full_signature": "@Test public void testPi()", "identifier": "testPi", "invocations": [ "assertFunction" ], "m...
{ "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(\"The constant Pi\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double pi()\n {\n return Math.PI;\n }", "class_method_signature": "MathFunctions.pi()", "constructor": false, "full_signature": "@Description(\"The constant Pi\") @ScalarFunction...
{ "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_1142
{ "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 testTooManyParameters()\n {\n Session session = testSessionBuilder()\n .addPreparedStatement(\"my_query\", \"SELECT * FROM foo where col1 = ?\")\n .build();\n assertPrestoExceptionThrownBy(() -> QUERY_PREPARER.prepareQuery(session, \"EXE...
{ "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_608
{ "fields": [], "file": "presto-teradata-functions/src/test/java/io/prestosql/teradata/functions/dateformat/TestDateFormatParser.java", "identifier": "TestDateFormatParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGreedinessLongFirst()\n {\n assertEquals(1, DateFormatParser.tokenize(\"yy\").size());\n assertEquals(1, DateFormatParser.tokenize(\"yyyy\").size());\n assertEquals(2, DateFormatParser.tokenize(\"yyyyyy\").size());\n }", "class_method_signature": "Tes...
{ "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_258
{ "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 testTemporalCompactionDate()\n {\n long day1 = Duration.ofNanos(System.nanoTime()).toDays();\n long day2 = day1 + 1;\n long day3 = day1 + 2;\n\n List<ShardIndexInfo> inputShards = ImmutableList.of(\n shardWithTemporalRange(DATE, day1, day...
{ "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_1007
{ "fields": [ { "declarator": "METADATA = createTestMetadataManager()", "modifier": "private static final", "original_string": "private static final Metadata METADATA = createTestMetadataManager();", "type": "Metadata", "var_name": "METADATA" }, { "declarator": "ADD_10_...
{ "body": "@Test\n public void testFailureDoesNotCorruptFutureResults()\n {\n PageFunctionCompiler functionCompiler = new PageFunctionCompiler(METADATA, 0);\n\n Supplier<PageProjection> projectionSupplier = functionCompiler.compileProjection(ADD_10_EXPRESSION, Optional.empty());\n PageProje...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "determinismEvaluator", "modifier": "private final", "original_string"...
{ "body": "public Supplier<PageProjection> compileProjection(RowExpression projection, Optional<String> classNameSuffix)\n {\n if (projectionCache == null) {\n return compileProjectionInternal(projection, classNameSuffix);\n }\n return projectionCache.getUnchecked(projection);\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_464
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestSortedRangeSet.java", "identifier": "TestSortedRangeSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSingleValue()\n {\n assertEquals(SortedRangeSet.of(BIGINT, 0L).getSingleValue(), 0L);\n assertThatThrownBy(() -> SortedRangeSet.all(BIGINT).getSingleValue())\n .isInstanceOf(IllegalStateException.class)\n .hasMessage(\"SortedRange...
{ "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 Object getSingleValue()\n {\n if (!isSingleValue()) {\n throw new IllegalStateException(\"SortedRangeSet does not have just a single value\");\n }\n return lowIndexedRanges.values().iterator().next().getSingleValue();\n }", "class_method_signatu...
{ "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_937
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/TestSchedulingOrderVisitor.java", "identifier": "TestSchedulingOrderVisitor", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIndexJoinOrder()\n {\n PlanBuilder planBuilder = new PlanBuilder(new PlanNodeIdAllocator(), dummyMetadata());\n TableScanNode a = planBuilder.tableScan(emptyList(), emptyMap());\n TableScanNode b = planBuilder.tableScan(emptyList(), emptyMap());\n L...
{ "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_1284
{ "fields": [ { "declarator": "tpcdsMetadata = new TpcdsMetadata()", "modifier": "private final", "original_string": "private final TpcdsMetadata tpcdsMetadata = new TpcdsMetadata();", "type": "TpcdsMetadata", "var_name": "tpcdsMetadata" }, { "declarator": "session = nu...
{ "body": "@Test\n public void testHiddenSchemas()\n {\n assertTrue(tpcdsMetadata.schemaExists(session, \"sf1\"));\n assertTrue(tpcdsMetadata.schemaExists(session, \"sf3000.0\"));\n assertFalse(tpcdsMetadata.schemaExists(session, \"sf0\"));\n assertFalse(tpcdsMetadata.schemaExists(se...
{ "fields": [ { "declarator": "TINY_SCHEMA_NAME = \"tiny\"", "modifier": "public static final", "original_string": "public static final String TINY_SCHEMA_NAME = \"tiny\";", "type": "String", "var_name": "TINY_SCHEMA_NAME" }, { "declarator": "TINY_SCALE_FACTOR = 0.01", ...
{ "body": "@Override\n public boolean schemaExists(ConnectorSession session, String schemaName)\n {\n return schemaNameToScaleFactor(schemaName) > 0;\n }", "class_method_signature": "TpcdsMetadata.schemaExists(ConnectorSession session, String schemaName)", "constructor": false, "full_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_872
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCharRightTrim()\n {\n assertFunction(\"RTRIM(CAST('' AS CHAR(20)))\", createCharType(20), padRight(\"\", 20));\n assertFunction(\"RTRIM(CAST(' hello ' AS CHAR(9)))\", createCharType(9), padRight(\" hello\", 9));\n assertFunction(\"RTRIM(CAST(' hello' A...
{ "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 end of a string\")\n @ScalarFunction(\"rtrim\")\n @LiteralParameters(\"x\")\n @SqlType(\"char(x)\")\n public static Slice charRightTrim(@SqlType(\"char(x)\") Slice slice)\n {\n return rightTrim(slice);\n }", "class_method_signature": "St...
{ "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_171
{ "fields": [ { "declarator": "TEST_COLUMN_NAMES = ImmutableList.of(\n \"col_bigint\",\n \"col_struct_of_primitives\",\n \"col_struct_of_non_primitives\",\n \"col_partition_key_1\",\n \"col_partition_key_2\")", "modifier": "private static final", ...
{ "body": "@Test\n public void testProjectSufficientColumns()\n {\n List<HiveColumnHandle> columns = ImmutableList.of(\n createProjectedColumnHandle(TEST_FULL_COLUMNS.get(\"col_struct_of_primitives\"), ImmutableList.of(0)),\n createProjectedColumnHandle(TEST_FULL_COLUMNS.get...
{ "fields": [ { "declarator": "readerColumns", "modifier": "private final", "original_string": "private final List<HiveColumnHandle> readerColumns;", "type": "List<HiveColumnHandle>", "var_name": "readerColumns" }, { "declarator": "readerBlockIndices", "modifier":...
{ "body": "public static Optional<ReaderProjections> projectSufficientColumns(List<HiveColumnHandle> columns)\n {\n requireNonNull(columns, \"columns is null\");\n\n if (columns.stream().allMatch(HiveColumnHandle::isBaseColumn)) {\n return Optional.empty();\n }\n\n ImmutableB...
{ "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_521
{ "fields": [], "file": "presto-cli/src/test/java/io/prestosql/cli/TestTsvPrinter.java", "identifier": "TestTsvPrinter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTsvPrintingNoRows()\n throws Exception\n {\n StringWriter writer = new StringWriter();\n List<String> fieldNames = ImmutableList.of(\"first\", \"last\");\n OutputPrinter printer = new TsvPrinter(fieldNames, writer, true);\n\n printer.fini...
{ "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 printRows(ImmutableList.of(), true);\n writer.flush();\n }", "class_method_signature": "TsvPrinter.finish()", "constructor": false, "full_signature": "@Override public void finish()", "identifier": "finish...
{ "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_1154
{ "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 testAborted()\n {\n StageStateMachine stateMachine = createStageStateMachine();\n\n assertTrue(stateMachine.transitionToAborted());\n assertFinalState(stateMachine, StageState.ABORTED);\n }", "class_method_signature": "TestStageStateMachine.testAborted()"...
{ "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 transitionToAborted()\n {\n return stageState.setIf(ABORTED, currentState -> !currentState.isDone());\n }", "class_method_signature": "StageStateMachine.transitionToAborted()", "constructor": false, "full_signature": "public boolean transitionToAborted()", "identifier": ...
{ "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_1011
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" } ], "file": "presto-main/src/test/java/io/pres...
{ "body": "@Test\n public void testAnd()\n {\n Expression a = name(\"a\");\n Expression b = name(\"b\");\n Expression c = name(\"c\");\n Expression d = name(\"d\");\n Expression e = name(\"e\");\n\n assertEquals(\n ExpressionUtils.and(a, b, c, d, e),\n ...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/ExpressionUtils.java", "identifier": "ExpressionUtils", "interfaces": "", "methods": [ { "class_method_signature": "ExpressionUtils.ExpressionUtils()", "constructor": true, "full_signature": "private ExpressionUtils()",...
{ "body": "public static Expression and(Expression... expressions)\n {\n return and(Arrays.asList(expressions));\n }", "class_method_signature": "ExpressionUtils.and(Expression... expressions)", "constructor": false, "full_signature": "public static Expression and(Expression... expressions)", "id...
{ "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_921
{ "fields": [ { "declarator": "metadata = MetadataManager.createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = MetadataManager.createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" } ], "file": "p...
{ "body": "@Test\n public void testSanity()\n {\n assertFalse(DeterminismEvaluator.isDeterministic(function(\"rand\"), metadata));\n assertFalse(DeterminismEvaluator.isDeterministic(function(\"random\"), metadata));\n assertFalse(DeterminismEvaluator.isDeterministic(function(\"shuffle\", Im...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/planner/DeterminismEvaluator.java", "identifier": "DeterminismEvaluator", "interfaces": "", "methods": [ { "class_method_signature": "DeterminismEvaluator.DeterminismEvaluator()", "constructor": true, "full_signature": "...
{ "body": "public static boolean isDeterministic(Expression expression, Metadata metadata)\n {\n return isDeterministic(expression, functionCall -> metadata.getFunctionMetadata(metadata.decodeFunction(functionCall.getName())));\n }", "class_method_signature": "DeterminismEvaluator.isDeterministic(Expre...
{ "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_188
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/rubix/TestRubixEnabledConfig.java", "identifier": "TestRubixEnabledConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(RubixEnabledConfig.class)\n .setCacheEnabled(false));\n }", "class_method_signature": "TestRubixEnabledConfig.testDefaults()", "constructor": false, "full_signature": "@Test public void testD...
{ "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_472
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestEquatableValueSet.java", "identifier": "TestEquatableValueSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnion()\n {\n assertEquals(EquatableValueSet.none(ID).union(EquatableValueSet.none(ID)), EquatableValueSet.none(ID));\n assertEquals(EquatableValueSet.all(ID).union(EquatableValueSet.all(ID)), EquatableValueSet.all(ID));\n assertEquals(EquatableValueSet.no...
{ "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": "@Override\n public EquatableValueSet union(ValueSet other)\n {\n EquatableValueSet otherValueSet = checkCompatibility(other);\n\n if (inclusive && otherValueSet.inclusive()) {\n return new EquatableValueSet(type, true, union(entries, otherValueSet.entries));\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_537
{ "fields": [ { "declarator": "CODEC = JsonCodec.jsonCodec(ResourceGroupId.class)", "modifier": "private static final", "original_string": "private static final JsonCodec<ResourceGroupId> CODEC = JsonCodec.jsonCodec(ResourceGroupId.class);", "type": "JsonCodec<ResourceGroupId>", "var...
{ "body": "@Test\n public void testMatch()\n {\n ResourceGroupId resourceGroupId1 = new ResourceGroupId(ImmutableList.of(\"global\", \"test\", \"user\", \"insert\"));\n ResourceGroupId resourceGroupId2 = new ResourceGroupId(ImmutableList.of(\"global\", \"test\", \"user\", \"select\"));\n da...
{ "fields": [ { "declarator": "log = Logger.get(DbSourceExactMatchSelector.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(DbSourceExactMatchSelector.class);", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "@Override\n public Optional<SelectionContext<ResourceGroupIdTemplate>> match(SelectionCriteria criteria)\n {\n if (criteria.getSource().isEmpty()) {\n return Optional.empty();\n }\n try {\n String resourceGroupId = dao.getExactMatchResourceGroup(environment,...
{ "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_167
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveSplitSource.java", "identifier": "TestHiveSplitSource", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFail()\n {\n HiveSplitSource hiveSplitSource = HiveSplitSource.allAtOnce(\n SESSION,\n \"database\",\n \"table\",\n 10,\n 10,\n DataSize.of(1, MEGABYTE),\n Integer.M...
{ "fields": [ { "declarator": "log = Logger.get(HiveSplitSource.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(HiveSplitSource.class);", "type": "Logger", "var_name": "log" }, { "declarator": "queryId", ...
{ "body": "void fail(Throwable e)\n {\n // The error must be recorded before setting the finish marker to make sure\n // isFinished will observe failure instead of successful completion.\n // Only record the first error message.\n if (setIf(stateReference, State.failed(e), state -> stat...
{ "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_864
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testStringPosition()\n {\n testStrPosAndPosition(\"high\", \"ig\", 2L);\n testStrPosAndPosition(\"high\", \"igx\", 0L);\n testStrPosAndPosition(\"Quadratically\", \"a\", 3L);\n testStrPosAndPosition(\"foobar\", \"foobar\", 1L);\n testStrPosAndPos...
{ "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(\"Returns index of first occurrence of a substring (or 0 if not found)\")\n @ScalarFunction(\"strpos\")\n @LiteralParameters({\"x\", \"y\"})\n @SqlType(StandardTypes.BIGINT)\n public static long stringPosition(@SqlType(\"varchar(x)\") Slice string, @SqlType(\"varchar(y)\") Slice su...
{ "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_11
{ "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 testOrderingOfSpecs()\n {\n dao.insertSpecRow(1, \"foo\", null, null, null, 2);\n dao.insertSessionProperty(1, \"prop_1\", \"val_1_2\");\n dao.insertSessionProperty(1, \"prop_2\", \"val_2_2\");\n\n dao.insertSpecRow(2, \"foo\", null, null, null, 1);\n ...
{ "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_1103
{ "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\n public void testDefaultCatalogAndSchema()\n {\n // none specified\n Session session = createSession(\n ImmutableListMultimap.<String, String>builder()\n .put(PRESTO_USER, \"testUser\")\n .build(),\n new ...
{ "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_649
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestBigintOperators.java", "identifier": "TestBigintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToDouble()\n {\n assertFunction(\"cast(37 as double)\", DOUBLE, 37.0);\n assertFunction(\"cast(100000000017 as double)\", DOUBLE, 100000000017.0);\n }", "class_method_signature": "TestBigintOperators.testCastToDouble()", "constructor": false, "full_s...
{ "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 @SqlType(StandardTypes.DOUBLE)\n public static double castToDouble(@SqlType(StandardTypes.BIGINT) long value)\n {\n return value;\n }", "class_method_signature": "BigintOperators.castToDouble(@SqlType(StandardTypes.BIGINT) long value)", "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_219
{ "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 testCorruption()\n throws Exception\n {\n assertEmptyStagingDirectory();\n assertBackupStats(0, 0, 0);\n\n File file = new File(temporary, \"corrupt\");\n Files.write(\"hello world\", file, UTF_8);\n\n try {\n backupManager....
{ "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_1046
{ "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 testLike()\n {\n analyze(\"SELECT '1' LIKE '1'\");\n analyze(\"SELECT CAST('1' as CHAR(1)) LIKE '1'\");\n }", "class_method_signature": "TestAnalyzer.testLike()", "constructor": false, "full_signature": "@Test public void testLike()", "identifier": "testLi...
{ "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_425
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestEncodedPolylineFunctions.java", "identifier": "TestEncodedPolylineFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testFromEncodedPolyline()\n {\n assertFromEncodedPolyline(\"\", \"LINESTRING EMPTY\");\n assertFromEncodedPolyline(\"iiqeFjs_jV\", \"LINESTRING EMPTY\");\n assertFromEncodedPolyline(\"_p~iF~ps|U_ulLnnqC_mqNvxq`@\", \"LINESTRING (-120.2 38.5, -120.95 40.7, -126...
{ "fields": [], "file": "presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/EncodedPolylineFunctions.java", "identifier": "EncodedPolylineFunctions", "interfaces": "", "methods": [ { "class_method_signature": "EncodedPolylineFunctions.EncodedPolylineFunctions()", "constructor": tru...
{ "body": "@Description(\"Decodes a polyline to a linestring\")\n @ScalarFunction(\"from_encoded_polyline\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice fromEncodedPolyline(@SqlType(StandardTypes.VARCHAR) Slice input)\n {\n return serialize(decodePolyline(input.toStringUtf8()));\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_976
{ "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 testGroupingOperationNoBitsSet()\n {\n List<Integer> groupingOrdinals = ImmutableList.of(4, 6);\n List<Set<Integer>> groupingSetOrdinals = ImmutableList.of(ImmutableSet.of(4, 6));\n\n for (Set<Integer> groupingSet : groupingSetOrdinals) {\n assertEq...
{ "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_833
{ "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 testRandom()\n {\n // random is non-deterministic\n functionAssertions.tryEvaluateWithAll(\"rand()\", DOUBLE, TEST_SESSION);\n functionAssertions.tryEvaluateWithAll(\"random()\", DOUBLE, TEST_SESSION);\n functionAssertions.tryEvaluateWithAll(\"rand(1000...
{ "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(\"A pseudo-random value\")\n @ScalarFunction(alias = \"rand\", deterministic = false)\n @SqlType(StandardTypes.DOUBLE)\n public static double random()\n {\n return ThreadLocalRandom.current().nextDouble();\n }", "class_method_signature": "MathFunctions.random()", "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_46
{ "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 testRefreshing()\n throws Exception\n {\n File configFile = newTemporaryFile();\n configFile.deleteOnExit();\n copy(new File(getResourcePath(\"catalog.json\")), configFile);\n\n SystemAccessControl accessControl = newFileBasedSystemAccessCont...
{ "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 void checkCanCreateView(SystemSecurityContext context, CatalogSchemaTableName view)\n {\n // check if user will be an owner of the view after creation\n if (!checkTablePermission(context, view, OWNERSHIP)) {\n denyCreateView(view.toString());\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_999
{ "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 testSemiJoin()\n {\n PlanNode node = new SemiJoinNode(\n newId(),\n filter(baseTableScan, and(greaterThan(AE, bigintLiteral(10)), lessThan(AE, bigintLiteral(100)))),\n filter(baseTableScan, greaterThan(AE, bigintLiteral(5))),\n ...
{ "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_130
{ "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(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = \"Error creating an instance of .*\")\n public void testCustomCredentialsClassCannotBeFound()\n throws Exception\n {\n Configuration config = new Configuration(false);\n config.set(S3_CREDENT...
{ "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_560
{ "fields": [ { "declarator": "tokenRing = RandomPartitionerTokenRing.INSTANCE", "modifier": "private static final", "original_string": "private static final RandomPartitionerTokenRing tokenRing = RandomPartitionerTokenRing.INSTANCE;", "type": "RandomPartitionerTokenRing", "var_name"...
{ "body": "@Test\n public void testGetTokenCountInRange()\n {\n assertEquals(tokenRing.getRingFraction(\"0\", \"0\"), 0.0, 0.001);\n assertEquals(tokenRing.getRingFraction(\"1\", \"0\"), 1.0, 0.001);\n assertEquals(tokenRing.getRingFraction(\"-1\", \"-1\"), 1.0, 0.001);\n assertEqual...
{ "fields": [ { "declarator": "INSTANCE = new RandomPartitionerTokenRing()", "modifier": "public static final", "original_string": "public static final RandomPartitionerTokenRing INSTANCE = new RandomPartitionerTokenRing();", "type": "RandomPartitionerTokenRing", "var_name": "INSTANC...
{ "body": "@Override\n public BigInteger getTokenCountInRange(String startToken, String endToken)\n {\n BigInteger start = new BigInteger(startToken);\n checkTokenBounds(start);\n BigInteger end = new BigInteger(endToken);\n checkTokenBounds(end);\n\n if (start.equals(end)) {\...
{ "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_777
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestArrayFunctions.java", "identifier": "TestArrayFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testArrayConstructor()\n {\n tryEvaluateWithAll(\"array[\" + Joiner.on(\", \").join(nCopies(254, \"rand()\")) + \"]\", new ArrayType(DOUBLE));\n assertNotSupported(\n \"array[\" + Joiner.on(\", \").join(nCopies(255, \"rand()\")) + \"]\",\n ...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/ArrayFunctions.java", "identifier": "ArrayFunctions", "interfaces": "", "methods": [ { "class_method_signature": "ArrayFunctions.ArrayFunctions()", "constructor": true, "full_signature": "private ArrayFuncti...
{ "body": "@ScalarFunction(hidden = true)\n @SqlType(\"array(unknown)\")\n public static Block arrayConstructor()\n {\n BlockBuilder blockBuilder = new ArrayType(UNKNOWN).createBlockBuilder(null, 0);\n return blockBuilder.build();\n }", "class_method_signature": "ArrayFunctions.arrayConstr...
{ "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_327
{ "fields": [], "file": "presto-jdbc/src/test/java/io/prestosql/jdbc/TestPrestoDriverUri.java", "identifier": "TestPrestoDriverUri", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNonEmptyPassword()\n throws SQLException\n {\n PrestoDriverUri parameters = createDriverUri(\"presto://localhost:8080?password=secret\");\n assertEquals(parameters.getProperties().getProperty(\"password\"), \"secret\");\n }", "class_method_signatu...
{ "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_1197
{ "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 testSharedBufferBlocking2()\n {\n // start with a complete future\n SettableFuture<?> blockedFuture = SettableFuture.create();\n blockedFuture.set(null);\n MockMemoryReservationHandler reservationHandler = new MockMemoryReservationHandler(blockedFuture)...
{ "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_1178
{ "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 testInvalidConstructorArg()\n {\n try {\n createPartitionedBuffer(createInitialEmptyOutputBuffers(PARTITIONED).withBuffer(FIRST, 0).withNoMoreBufferIds(), DataSize.ofBytes(0));\n fail(\"Expected IllegalStateException\");\n }\n catch (Ille...
{ "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 fail()\n {\n // ignore fail if the buffer already in a terminal state.\n if (state.setIf(FAILED, oldState -> !oldState.isTerminal())) {\n memoryManager.setNoBlockOnFull();\n forceFreeMemory();\n // DO NOT destroy buffers or set no...
{ "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_632
{ "fields": [ { "declarator": "FIRST_PARTITION_START = -10", "modifier": "private static final", "original_string": "private static final int FIRST_PARTITION_START = -10;", "type": "int", "var_name": "FIRST_PARTITION_START" }, { "declarator": "SECOND_PARTITION_START = 0...
{ "body": "@Test\n public void testFileSpiller()\n throws Exception\n {\n try (PartitioningSpiller spiller = factory.create(\n TYPES,\n new FourFixedPartitionsPartitionFunction(0),\n mockSpillContext(),\n mockMemoryContext(scheduledEx...
{ "fields": [ { "declarator": "types", "modifier": "private final", "original_string": "private final List<Type> types;", "type": "List<Type>", "var_name": "types" }, { "declarator": "partitionFunction", "modifier": "private final", "original_string": "priva...
{ "body": "@Override\n public synchronized PartitioningSpillResult partitionAndSpill(Page page, IntPredicate spillPartitionMask)\n {\n requireNonNull(page, \"page is null\");\n requireNonNull(spillPartitionMask, \"spillPartitionMask is null\");\n checkArgument(page.getChannelCount() == type...
{ "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_798
{ "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 testFromIEEE754Binary64()\n {\n assertFunction(\"from_ieee754_64(from_hex('0000000000000000'))\", DOUBLE, 0.0);\n assertFunction(\"from_ieee754_64(from_hex('3FF0000000000000'))\", DOUBLE, 1.0);\n assertFunction(\"from_ieee754_64(to_ieee754_64(3.1415926))\", DO...
{ "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(\"Decode the 64-bit big-endian binary in IEEE 754 double-precision floating-point format\")\n @ScalarFunction(\"from_ieee754_64\")\n @SqlType(StandardTypes.DOUBLE)\n public static double fromIEEE754Binary64(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n checkCondition(...
{ "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_262
{ "fields": [], "file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/storage/organization/TestTuple.java", "identifier": "TestTuple", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = \"types must be the same\")\n public void testMismatchedTypes()\n {\n List<Type> types1 = ImmutableList.of(createVarcharType(3));\n List<Type> types2 = ImmutableList.of(createVarcharType(4));\n ...
{ "fields": [ { "declarator": "types", "modifier": "private final", "original_string": "private final List<Type> types;", "type": "List<Type>", "var_name": "types" }, { "declarator": "values", "modifier": "private final", "original_string": "private final Li...
{ "body": "@Override\n public int compareTo(Tuple o)\n {\n checkArgument(o.getTypes().size() == types.size(), \"types must be of same size\");\n for (int i = 0; i < types.size(); i++) {\n checkArgument(o.getTypes().get(i).equals(types.get(i)), \"types must be the same\");\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_1251
{ "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 testChar()\n {\n assertEquals(getDomain(CHAR, 0, null), none(CHAR));\n assertEquals(getDomain(CHAR, 10, null), all(CHAR));\n\n assertEquals(getDomain(CHAR, 0, stringColumnStats(null, null, null)), none(CHAR));\n assertEquals(getDomain(CHAR, 0, stringCol...
{ "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_848
{ "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 testCurrentDate()\n {\n // current date is the time at midnight in the session time zone\n assertFunction(\"CURRENT_DATE\", DateType.DATE, new SqlDate(toIntExact(epochDaysInZone(TIME_ZONE_KEY, session.getStart()))));\n }", "class_method_signature": "TestDateTime...
{ "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": "@Description(\"Current date\")\n @ScalarFunction\n @SqlType(StandardTypes.DATE)\n public static long currentDate(ConnectorSession session)\n {\n ISOChronology chronology = getChronology(session.getTimeZoneKey());\n\n // It is ok for this method to use the Object interfaces because...
{ "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_370
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestBingTileFunctions.java", "identifier": "TestBingTileFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testBingTilePolygon()\n {\n assertFunction(\"ST_AsText(bing_tile_polygon(bing_tile('123030123010121')))\", VARCHAR, \"POLYGON ((59.996337890625 30.11662158281937, 60.00732421875 30.11662158281937, 60.00732421875 30.12612436422458, 59.996337890625 30.12612436422458, 59.99633...
{ "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 Bing tile, returns the polygon representation of the tile\")\n @ScalarFunction(\"bing_tile_polygon\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice bingTilePolygon(@SqlType(BingTileType.NAME) long input)\n {\n BingTile tile = BingTile.decode(input);\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_720
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/metadata/TestTableLayoutResult.java", "identifier": "TestTableLayoutResult", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testComputeEnforced()\n {\n assertComputeEnforced(TupleDomain.all(), TupleDomain.all(), TupleDomain.all());\n assertComputeEnforcedFails(TupleDomain.all(), TupleDomain.none());\n assertComputeEnforced(TupleDomain.none(), TupleDomain.all(), TupleDomain.none());...
{ "fields": [ { "declarator": "newTableHandle", "modifier": "private final", "original_string": "private final TableHandle newTableHandle;", "type": "TableHandle", "var_name": "newTableHandle" }, { "declarator": "layout", "modifier": "private final", "origin...
{ "body": "public static TupleDomain<ColumnHandle> computeEnforced(TupleDomain<ColumnHandle> predicate, TupleDomain<ColumnHandle> unenforced)\n {\n if (predicate.isNone()) {\n // If the engine requests that the connector provides a layout with a domain of \"none\". The connector can have two poss...
{ "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_235
{ "fields": [], "file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/metadata/TestDatabaseConfig.java", "identifier": "TestDatabaseConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(DatabaseConfig.class)\n .setDatabaseType(null));\n }", "class_method_signature": "TestDatabaseConfig.testDefaults()", "constructor": false, "full_signature": "@Test public void testDefaults()...
{ "fields": [ { "declarator": "databaseType", "modifier": "private", "original_string": "private String databaseType;", "type": "String", "var_name": "databaseType" } ], "file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/metadata/DatabaseConfig.java...
{ "body": "@Config(\"metadata.db.type\")\n @ConfigDescription(\"Metadata database type (supported types: h2, mysql)\")\n public DatabaseConfig setDatabaseType(String databaseType)\n {\n this.databaseType = databaseType;\n return this;\n }", "class_method_signature": "DatabaseConfig.setData...
{ "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_665
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java", "identifier": "TestSmallintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSubtract()\n {\n assertFunction(\"SMALLINT'37' - SMALLINT'37'\", SMALLINT, (short) 0);\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(SUBTRACT)\n @SqlType(StandardTypes.SMALLINT)\n public static long subtract(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right)\n {\n try {\n return Shorts.checkedCast(left - right);\n }\n catch (IllegalArgumentExc...
{ "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_1085
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/cost/TestStatisticRange.java", "identifier": "TestStatisticRange", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAddAndMaxDistinctValues()\n {\n assertEquals(unboundedRange(NaN).addAndMaxDistinctValues(unboundedRange(NaN)), unboundedRange(NaN));\n assertEquals(unboundedRange(NaN).addAndMaxDistinctValues(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 addAndMaxDistinctValues(StatisticRange other)\n {\n double newDistinctValues = max(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_1206
{ "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": "testSession", "modifier":...
{ "body": "@Test\n public void testDuplicatedCreateSchemaIfNotExists()\n {\n String schemaName = \"test_db\";\n CreateSchema statement = new CreateSchema(QualifiedName.of(schemaName), true, ImmutableList.of());\n getFutureValue(new CreateSchemaTask().internalExecute(statement, metadata, new...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/CreateSchemaTask.java", "identifier": "CreateSchemaTask", "interfaces": "implements DataDefinitionTask<CreateSchema>", "methods": [ { "class_method_signature": "CreateSchemaTask.getName()", "constructor": false, "f...
{ "body": "@VisibleForTesting\n ListenableFuture<?> internalExecute(CreateSchema statement, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters)\n {\n CatalogSchemaName schema = createCatalogSchemaName(session, statement, Optional.of(statement.getSchemaName()));\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_85
{ "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 testTableNonHiveLayout()\n {\n alluxio.grpc.table.TableInfo.Builder alluxioTable = alluxio.grpc.table.TableInfo.newBuilder()\n .setLayout(TestingAlluxioMetastoreObjects.getTestingNonHiveLayout());\n ProtoUtil...
{ "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_409
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTIntersects()\n {\n assertFunction(\"ST_Intersects(ST_GeometryFromText('POINT (50 100)'), ST_GeometryFromText('POINT (150 150)'))\", BOOLEAN, false);\n assertFunction(\"ST_Intersects(ST_GeometryFromText('MULTIPOINT (50 100, 50 200)'), ST_GeometryFromText('POINT ...
{ "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 spatially intersect in 2D - (share any portion of space) and FALSE if they don't (they are Disjoint)\")\n @ScalarFunction(\"ST_Intersects\")\n @SqlType(BOOLEAN)\n public static Boolean stIntersects(@SqlType(GEOMETRY_TYPE_NAME) Slice 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_736
{ "fields": [ { "declarator": "factory", "modifier": "private final", "original_string": "private final AccumulatorFactory factory;", "type": "AccumulatorFactory", "var_name": "factory" }, { "declarator": "input", "modifier": "private final", "original_strin...
{ "body": "@Test\n public void testMerge()\n {\n Accumulator singleStep = factory.createAccumulator();\n singleStep.addInput(input);\n Block singleStepResult = getFinalBlock(singleStep);\n\n Accumulator partialStep = factory.createAccumulator();\n partialStep.addInput(input);\...
{ "fields": [ { "declarator": "ENTRY_BUFFER_SIZE = 100", "modifier": "public static final", "original_string": "public static final int ENTRY_BUFFER_SIZE = 100;", "type": "int", "var_name": "ENTRY_BUFFER_SIZE" } ], "file": "presto-main/src/main/java/io/prestosql/operator/aggr...
{ "body": "@CombineFunction\n public static void merge(@AggregationState State state, State other)\n {\n NumericHistogram input = other.get();\n NumericHistogram previous = state.get();\n\n if (previous == null) {\n state.set(input);\n }\n else {\n previo...
{ "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_366
{ "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" } ], "file": "presto-parser/src/test/java/io/pres...
{ "body": "@Test\n public void testSetPath()\n {\n assertStatement(\"SET PATH iLikeToEat.apples, andBananas\",\n new SetPath(new PathSpecification(Optional.empty(), ImmutableList.of(\n new PathElement(Optional.of(new Identifier(\"iLikeToEat\")), new Identifier(\"appl...
{ "fields": [ { "declarator": "LEXER_ERROR_LISTENER = new BaseErrorListener()\n {\n @Override\n public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String message, RecognitionException e)\n {\n throw new ParsingExc...
{ "body": "public Statement createStatement(String sql, ParsingOptions parsingOptions)\n {\n return (Statement) invokeParser(\"statement\", sql, SqlBaseParser::singleStatement, parsingOptions);\n }", "class_method_signature": "SqlParser.createStatement(String sql, ParsingOptions parsingOptions)", "co...
{ "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_1093
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" }, { "declarator": "normalizer = new Stat...
{ "body": "@Test\n public void testDropNonOutputSymbols()\n {\n Symbol a = new Symbol(\"a\");\n Symbol b = new Symbol(\"b\");\n Symbol c = new Symbol(\"c\");\n PlanNodeStatsEstimate estimate = PlanNodeStatsEstimate.builder()\n .setOutputRowCount(40)\n .a...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/cost/StatsNormalizer.java", "identifier": "StatsNormalizer", "interfaces": "", "methods": [ { "class_method_signature": "StatsNormalizer.normalize(PlanNodeStatsEstimate stats, TypeProvider types)", "constructor": false, "ful...
{ "body": "public PlanNodeStatsEstimate normalize(PlanNodeStatsEstimate stats, TypeProvider types)\n {\n return normalize(stats, Optional.empty(), types);\n }", "class_method_signature": "StatsNormalizer.normalize(PlanNodeStatsEstimate stats, TypeProvider types)", "constructor": false, "full_signat...
{ "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_1139
{ "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 testSelectStatement()\n {\n PreparedQuery preparedQuery = QUERY_PREPARER.prepareQuery(TEST_SESSION, \"SELECT * FROM foo\");\n assertEquals(preparedQuery.getStatement(),\n simpleQuery(selectList(new AllColumns()), table(QualifiedName.of(\"foo\"))));\n ...
{ "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_389
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTIsValid()\n {\n // empty geometries are valid\n assertValidGeometry(\"POINT EMPTY\");\n assertValidGeometry(\"MULTIPOINT EMPTY\");\n assertValidGeometry(\"LINESTRING EMPTY\");\n assertValidGeometry(\"MULTILINESTRING EMPTY\");\n asser...
{ "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 true if the input geometry is well formed\")\n @ScalarFunction(\"ST_IsValid\")\n @SqlType(BOOLEAN)\n public static boolean stIsValid(@SqlType(GEOMETRY_TYPE_NAME) Slice input)\n {\n GeometryCursor cursor = deserialize(input).getEsriGeometryCursor();\n while (...
{ "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_673
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java", "identifier": "TestSmallintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToDouble()\n {\n assertFunction(\"cast(SMALLINT'37' as double)\", DOUBLE, 37.0);\n assertFunction(\"cast(SMALLINT'17' as double)\", DOUBLE, 17.0);\n }", "class_method_signature": "TestSmallintOperators.testCastToDouble()", "constructor": false, "full...
{ "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 @SqlType(StandardTypes.DOUBLE)\n public static double castToDouble(@SqlType(StandardTypes.SMALLINT) long value)\n {\n return value;\n }", "class_method_signature": "SmallintOperators.castToDouble(@SqlType(StandardTypes.SMALLINT) long value)", "constructor": fa...
{ "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...