id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
166515022_1121 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/server/ui/TestFixedUserWebUiConfig.java",
"identifier": "TestFixedUserWebUiConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"web-ui.user\", \"some-user\")\n .build();\n\n FixedUserWebUiConfig expected = new FixedUserWebUiConfig()\n ... | {
"fields": [
{
"declarator": "username",
"modifier": "private",
"original_string": "private String username;",
"type": "String",
"var_name": "username"
}
],
"file": "presto-main/src/main/java/io/prestosql/server/ui/FixedUserWebUiConfig.java",
"identifier": "FixedUserWebUiC... | {
"body": "@Config(\"web-ui.user\")\n public FixedUserWebUiConfig setUsername(String username)\n {\n this.username = username;\n return this;\n }",
"class_method_signature": "FixedUserWebUiConfig.setUsername(String username)",
"constructor": false,
"full_signature": "@Config(\"web-ui.user... | {
"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_1064 | {
"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 testLambdaCapture()\n {\n analyze(\"SELECT apply(c1, x -> x + c2) FROM (VALUES (1, 2), (3, 4), (5, 6)) t(c1, c2)\");\n analyze(\"SELECT apply(c1 + 10, x -> apply(x + 100, y -> c1)) FROM (VALUES 1) t(c1)\");\n\n // reference lambda variable of the not-immediate... | {
"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_684 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java",
"identifier": "TestIntegerOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testDivide()\n {\n assertFunction(\"INTEGER'37' / INTEGER'37'\", INTEGER, 1);\n assertFunction(\"INTEGER'37' / INTEGER'17'\", INTEGER, 37 / 17);\n assertFunction(\"INTEGER'17' / INTEGER'37'\", INTEGER, 17 / 37);\n assertFunction(\"INTEGER'17' / INTEGER'... | {
"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(DIVIDE)\n @SqlType(StandardTypes.INTEGER)\n public static long divide(@SqlType(StandardTypes.INTEGER) long left, @SqlType(StandardTypes.INTEGER) long right)\n {\n try {\n return left / right;\n }\n catch (ArithmeticException e) {\n throw 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_954 | {
"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 testPushesProjectionThroughJoin()\n {\n PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator();\n PlanBuilder p = new PlanBuilder(idAllocator, dummyMetadata());\n Symbol a0 = p.symbol(\"a0\");\n Symbol a1 = p.symbol(\"a1\");\n Symbol a2 = 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_407 | {
"fields": [],
"file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java",
"identifier": "TestGeoFunctions",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testSTDisjoint()\n {\n assertFunction(\"ST_Disjoint(ST_GeometryFromText('POINT (50 100)'), ST_GeometryFromText('POINT (150 150)'))\", BOOLEAN, true);\n assertFunction(\"ST_Disjoint(ST_GeometryFromText('MULTIPOINT (50 100, 50 200)'), ST_GeometryFromText('POINT (50 100... | {
"fields": [
{
"declarator": "OR_JOINER = Joiner.on(\" or \")",
"modifier": "private static final",
"original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");",
"type": "Joiner",
"var_name": "OR_JOINER"
},
{
"declarator": "EMPTY_POLYGON = serializ... | {
"body": "@SqlNullable\n @Description(\"Returns TRUE if the Geometries do not spatially intersect - if they do not share any space together\")\n @ScalarFunction(\"ST_Disjoint\")\n @SqlType(BOOLEAN)\n public static Boolean stDisjoint(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMETRY_TYPE_NAME) Sl... | {
"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_112 | {
"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 testInvalidGetPartitionNamesByFilterAll()\n {\n assertTrue(metastore.getPartitionNamesByFilter(IDENTITY, BAD_DATABASE, TEST_TABLE, PARTITION_COLUMN_NAMES, TupleDomain.all()).isEmpty());\n }",
"class_method_signature": "TestCachingHiveMetastore.testInvalidGetPartitionNa... | {
"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<List<String>> getPartitionNamesByFilter(HiveIdentity identity, String databaseName, String tableName, List<String> columnNames, TupleDomain<String> partitionKeysFilter)\n {\n if (partitionKeysFilter.isNone()) {\n return Optional.of(ImmutableList.of());\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_542 | {
"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 testMatchByUsersAndGroups()\n {\n ManagerSpec managerSpec = managerSpec(\n resourceGroupSpec(\"group\"),\n ImmutableList.of(selectorSpec(groupIdTemplate(\"group\"))\n .userGroups(\"Matching group\")\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_1208 | {
"fields": [
{
"declarator": "executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"-%s\"))",
"modifier": "private",
"original_string": "private ExecutorService executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"-%s\"));",
"type": "... | {
"body": "@Test\n public void testSet()\n throws Exception\n {\n StateMachine<State> stateMachine = new StateMachine<>(\"test\", executor, State.BREAKFAST, ImmutableSet.of(State.DINNER));\n assertEquals(stateMachine.get(), State.BREAKFAST);\n\n assertNoStateChange(stateMachine, ... | {
"fields": [
{
"declarator": "log = Logger.get(StateMachine.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(StateMachine.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "name",
"modifi... | {
"body": "public T set(T newState)\n {\n T oldState = trySet(newState);\n checkState(oldState.equals(newState) || !isTerminalState(oldState), \"%s cannot transition from %s to %s\", name, state, newState);\n return oldState;\n }",
"class_method_signature": "StateMachine.set(T newState)",... | {
"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_64 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java",
"identifier": "TestGlueExpressionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildGlueExpressionTupleDomainEqualsSingleValue()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addStringValues(\"col1\", \"2020-01-01\")\n .addStringValues(\"col2\", \"2020-02-20\")\n .build();\n ... | {
"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_811 | {
"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 testAtan2()\n {\n for (double doubleValue : DOUBLE_VALUES) {\n assertFunction(\"atan2(\" + doubleValue + \", \" + doubleValue + \")\", DOUBLE, Math.atan2(doubleValue, doubleValue));\n assertFunction(\"atan2(REAL '\" + (float) doubleValue + \"', REAL '\... | {
"fields": [
{
"declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()",
"modifier": "public static final",
"original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();",
"type": "SqlScalarFunction",
"var_name": "DECIMAL_MOD_FUNCTION"
... | {
"body": "@Description(\"Arc tangent of given fraction\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double atan2(@SqlType(StandardTypes.DOUBLE) double num1, @SqlType(StandardTypes.DOUBLE) double num2)\n {\n return Math.atan2(num1, num2);\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_1176 | {
"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 testStartTransactionTooManyAccessModes()\n {\n Session session = sessionBuilder()\n .setClientTransactionSupport()\n .build();\n TransactionManager transactionManager = createTestTransactionManager();\n QueryStateMachine stateMach... | {
"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_796 | {
"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 testFromIEEE754Binary32()\n {\n assertFunction(\"from_ieee754_32(from_hex('3F800000'))\", REAL, 1.0f);\n assertFunction(\"from_ieee754_32(to_ieee754_32(CAST(1.0 AS REAL)))\", REAL, 1.0f);\n assertFunction(\"from_ieee754_32(from_hex('4048F5C3'))\", REAL, 3.14f)... | {
"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 32-bit big-endian binary in IEEE 754 single-precision floating-point format\")\n @ScalarFunction(\"from_ieee754_32\")\n @SqlType(StandardTypes.REAL)\n public static long fromIEEE754Binary32(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n checkCondition(slic... | {
"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_329 | {
"fields": [],
"file": "presto-jdbc/src/test/java/io/prestosql/jdbc/TestPrestoDriverUri.java",
"identifier": "TestPrestoDriverUri",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUriWithHttpProxy()\n throws SQLException\n {\n PrestoDriverUri parameters = createDriverUri(\"presto://localhost:8080?httpProxy=localhost:5678\");\n assertUriPortScheme(parameters, 8080, \"http\");\n\n Properties properties = parameters.getPrope... | {
"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_283 | {
"fields": [],
"file": "presto-thrift-api/src/test/java/io/prestosql/plugin/thrift/api/TestPrestoThriftId.java",
"identifier": "TestPrestoThriftId",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSummarize()\n {\n assertEquals(summarize(bytes()), \"\");\n assertEquals(summarize(bytes(1)), \"01\");\n assertEquals(summarize(bytes(255, 254, 253, 252, 251, 250, 249)), \"FFFEFDFCFBFAF9\");\n assertEquals(summarize(bytes(0, 1, 2, 3, 4, 5, 6, 7, 8,... | {
"fields": [
{
"declarator": "PREFIX_SUFFIX_BYTES = 8",
"modifier": "private static final",
"original_string": "private static final int PREFIX_SUFFIX_BYTES = 8;",
"type": "int",
"var_name": "PREFIX_SUFFIX_BYTES"
},
{
"declarator": "FILLER = \"..\"",
"modifier": ... | {
"body": "@VisibleForTesting\n static String summarize(byte[] value)\n {\n if (value.length * 2 <= MAX_DISPLAY_CHARACTERS) {\n return BaseEncoding.base16().encode(value);\n }\n return BaseEncoding.base16().encode(value, 0, PREFIX_SUFFIX_BYTES)\n + FILLER\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_779 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestJsonFunctions.java",
"identifier": "TestJsonFunctions",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testJsonArrayLength()\n {\n assertFunction(\"JSON_ARRAY_LENGTH('[]')\", BIGINT, 0L);\n assertFunction(\"JSON_ARRAY_LENGTH('[1]')\", BIGINT, 1L);\n assertFunction(\"JSON_ARRAY_LENGTH('[1, \\\"foo\\\", null]')\", BIGINT, 3L);\n assertFunction(\"JSON_ARRAY... | {
"fields": [
{
"declarator": "JSON_FACTORY = new JsonFactory()\n .disable(CANONICALIZE_FIELD_NAMES)",
"modifier": "private static final",
"original_string": "private static final JsonFactory JSON_FACTORY = new JsonFactory()\n .disable(CANONICALIZE_FIELD_NAMES);",
"ty... | {
"body": "@SqlNullable\n @ScalarFunction\n @SqlType(StandardTypes.BIGINT)\n public static Long jsonArrayLength(@SqlType(StandardTypes.JSON) Slice json)\n {\n try (JsonParser parser = createJsonParser(JSON_FACTORY, json)) {\n if (parser.nextToken() != START_ARRAY) {\n retu... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1033 | {
"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 testGroupByWithRowExpression()\n {\n // TODO: verify output\n analyze(\"SELECT (a, b) FROM t1 GROUP BY a, b\");\n }",
"class_method_signature": "TestAnalyzer.testGroupByWithRowExpression()",
"constructor": false,
"full_signature": "@Test public void testGrou... | {
"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_1199 | {
"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 testForceFreeMemory()\n {\n BroadcastOutputBuffer buffer = createBroadcastBuffer(\n createInitialEmptyOutputBuffers(BROADCAST)\n .withBuffer(FIRST, BROADCAST_PARTITION_ID)\n .withNoMoreBufferIds(),\n ... | {
"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 void forceFreeMemory()\n {\n memoryManager.close();\n }",
"class_method_signature": "BroadcastOutputBuffer.forceFreeMemory()",
"constructor": false,
"full_signature": "@VisibleForTesting void forceFreeMemory()",
"identifier": "forceFreeMemory",
"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_450 | {
"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 testMultiplyOverflow()\n {\n assertMultiplyOverflows(unscaledDecimal(\"99999999999999\"), unscaledDecimal(\"-10000000000000000000000000\"));\n assertMultiplyOverflows(MAX_DECIMAL, unscaledDecimal(\"10\"));\n }",
"class_method_signature": "TestUnscaledDecimal128A... | {
"fields": [
{
"declarator": "NUMBER_OF_LONGS = 2",
"modifier": "private static final",
"original_string": "private static final int NUMBER_OF_LONGS = 2;",
"type": "int",
"var_name": "NUMBER_OF_LONGS"
},
{
"declarator": "NUMBER_OF_INTS = 2 * NUMBER_OF_LONGS",
"mo... | {
"body": "public static Slice unscaledDecimal()\n {\n return Slices.allocate(UNSCALED_DECIMAL_128_SLICE_LENGTH);\n }",
"class_method_signature": "UnscaledDecimal128Arithmetic.unscaledDecimal()",
"constructor": false,
"full_signature": "public static Slice unscaledDecimal()",
"identifier": "unsca... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_903 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/sql/planner/optimizations/TestLocalProperties.java",
"identifier": "TestLocalProperties",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMatchedGroupHierarchy()\n {\n List<LocalProperty<String>> actual = builder()\n .grouped(\"a\")\n .grouped(\"b\")\n .grouped(\"c\")\n .build();\n\n assertMatch(\n actual,\n b... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/sql/planner/optimizations/LocalProperties.java",
"identifier": "LocalProperties",
"interfaces": "",
"methods": [
{
"class_method_signature": "LocalProperties.LocalProperties()",
"constructor": true,
"full_signature": "privat... | {
"body": "public static <T> List<LocalProperty<T>> grouped(Collection<T> columns)\n {\n return ImmutableList.of(new GroupingProperty<>(columns));\n }",
"class_method_signature": "LocalProperties.grouped(Collection<T> columns)",
"constructor": false,
"full_signature": "public static List<LocalPrope... | {
"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_33 | {
"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 testTableRulesForCheckCanRevokeTablePrivilege()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-table.json\");\n\n accessControl.checkCanRevokeTablePrivilege(ADMIN, Privilege.DELETE, new CatalogSchemaTableName(\"so... | {
"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 checkCanRevokeTablePrivilege(SystemSecurityContext context, Privilege privilege, CatalogSchemaTableName table, PrestoPrincipal revokee, boolean grantOption)\n {\n if (!checkTablePermission(context, table, OWNERSHIP)) {\n denyRevokeTablePrivilege(privilege.nam... | {
"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_846 | {
"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 testInverseBetaCdf()\n {\n assertFunction(\"inverse_beta_cdf(3, 3.6, 0.0)\", DOUBLE, 0.0);\n assertFunction(\"inverse_beta_cdf(3, 3.6, 1.0)\", DOUBLE, 1.0);\n assertFunction(\"inverse_beta_cdf(3, 3.6, 0.3)\", DOUBLE, 0.3469675485440618);\n assertFunctio... | {
"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(\"Inverse of Beta cdf given a, b parameters and probability\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double inverseBetaCdf(\n @SqlType(StandardTypes.DOUBLE) double a,\n @SqlType(StandardTypes.DOUBLE) double b,\n @SqlType(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_515 | {
"fields": [],
"file": "presto-cli/src/test/java/io/prestosql/cli/TestClientOptions.java",
"identifier": "TestClientOptions",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testServerHttpsUri()\n {\n Console console = createConsole(\"--server=https://test/foo\");\n ClientSession session = console.clientOptions.toClientSession();\n assertEquals(session.getServer().toString(), \"https://test/foo\");\n }",
"class_method_signatu... | {
"fields": [
{
"declarator": "NAME_VALUE_SPLITTER = Splitter.on('=').limit(2)",
"modifier": "private static final",
"original_string": "private static final Splitter NAME_VALUE_SPLITTER = Splitter.on('=').limit(2);",
"type": "Splitter",
"var_name": "NAME_VALUE_SPLITTER"
},
{... | {
"body": "public ClientSession toClientSession()\n {\n return new ClientSession(\n parseServer(server),\n user,\n source,\n Optional.ofNullable(traceToken),\n parseClientTags(nullToEmpty(clientTags)),\n clientInfo,\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_145 | {
"fields": [
{
"declarator": "TABLE = new SchemaTableName(\"schema\", \"table\")",
"modifier": "private static final",
"original_string": "private static final SchemaTableName TABLE = new SchemaTableName(\"schema\", \"table\");",
"type": "SchemaTableName",
"var_name": "TABLE"
},... | {
"body": "@Test\n public void testGetTableStatisticsUnpartitioned()\n {\n PartitionStatistics statistics = PartitionStatistics.builder()\n .setBasicStatistics(new HiveBasicStatistics(OptionalLong.empty(), OptionalLong.of(1000), OptionalLong.empty(), OptionalLong.empty()))\n ... | {
"fields": [
{
"declarator": "log = Logger.get(MetastoreHiveStatisticsProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(MetastoreHiveStatisticsProvider.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public TableStatistics getTableStatistics(\n ConnectorSession session,\n SchemaTableName table,\n Map<String, ColumnHandle> columns,\n Map<String, Type> columnTypes,\n List<HivePartition> partitions)\n {\n if (!isStatisticsEnab... | {
"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_352 | {
"fields": [
{
"declarator": "SERVER_INFO_CODEC = jsonCodec(ServerInfo.class)",
"modifier": "private static final",
"original_string": "private static final JsonCodec<ServerInfo> SERVER_INFO_CODEC = jsonCodec(ServerInfo.class);",
"type": "JsonCodec<ServerInfo>",
"var_name": "SERVER_... | {
"body": "@Test\n public void testGetServerInfo()\n throws Exception\n {\n ServerInfo expected = new ServerInfo(UNKNOWN, \"test\", true, false, Optional.of(Duration.valueOf(\"2m\")));\n\n server.enqueue(new MockResponse()\n .addHeader(CONTENT_TYPE, \"application/json\")\... | {
"fields": [
{
"declarator": "SERVER_INFO_CODEC = jsonCodec(ServerInfo.class)",
"modifier": "private static final",
"original_string": "private static final JsonCodec<ServerInfo> SERVER_INFO_CODEC = jsonCodec(ServerInfo.class);",
"type": "JsonCodec<ServerInfo>",
"var_name": "SERVER_... | {
"body": "public ServerInfo getServerInfo(URI server)\n {\n HttpUrl url = HttpUrl.get(server);\n if (url == null) {\n throw new ClientException(\"Invalid server URL: \" + server);\n }\n url = url.newBuilder().encodedPath(\"/v1/info\").build();\n\n Request request = 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_702 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestRealOperators.java",
"identifier": "TestRealOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testCastToTinyint()\n {\n assertFunction(\"CAST(REAL'127.45' AS TINYINT)\", TINYINT, (byte) 127);\n assertFunction(\"CAST(REAL'-128.234' AS TINYINT)\", TINYINT, (byte) -128);\n assertFunction(\"CAST(REAL'9.99' AS TINYINT)\", TINYINT, (byte) 10);\n asser... | {
"fields": [
{
"declarator": "MIN_LONG_AS_FLOAT = -0x1p63f",
"modifier": "private static final",
"original_string": "private static final float MIN_LONG_AS_FLOAT = -0x1p63f;",
"type": "float",
"var_name": "MIN_LONG_AS_FLOAT"
},
{
"declarator": "MAX_LONG_PLUS_ONE_AS_FLO... | {
"body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.TINYINT)\n public static long castToTinyint(@SqlType(StandardTypes.REAL) long value)\n {\n float floatValue = intBitsToFloat((int) value);\n if (Float.isNaN(floatValue)) {\n throw new PrestoException(INVALID_CAST_ARGUMENT, \"C... | {
"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_1048 | {
"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 testGroupBy()\n {\n // TODO: validate output\n analyze(\"SELECT a, SUM(b) FROM t1 GROUP BY a\");\n }",
"class_method_signature": "TestAnalyzer.testGroupBy()",
"constructor": false,
"full_signature": "@Test public void testGroupBy()",
"identifier": "testGro... | {
"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_217 | {
"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 testSimple()\n throws Exception\n {\n assertEmptyStagingDirectory();\n assertBackupStats(0, 0, 0);\n\n List<CompletableFuture<?>> futures = new ArrayList<>();\n List<UUID> uuids = new ArrayList<>(5);\n for (int i = 0; i < 5; i++) {\n ... | {
"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_647 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestBigintOperators.java",
"identifier": "TestBigintOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testModulus()\n {\n assertFunction(\"100000000037 % 37\", BIGINT, 100000000037L % 37L);\n assertFunction(\"37 % 100000000017\", BIGINT, 37 % 100000000017L);\n assertFunction(\"100000000017 % 37\", BIGINT, 100000000017L % 37L);\n assertFunction(\"1000000... | {
"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(MODULUS)\n @SqlType(StandardTypes.BIGINT)\n public static long modulus(@SqlType(StandardTypes.BIGINT) long left, @SqlType(StandardTypes.BIGINT) long right)\n {\n try {\n return left % right;\n }\n catch (ArithmeticException e) {\n throw 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_997 | {
"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 testRightJoin()\n {\n ImmutableList.Builder<JoinNode.EquiJoinClause> criteriaBuilder = ImmutableList.builder();\n criteriaBuilder.add(new JoinNode.EquiJoinClause(A, D));\n criteriaBuilder.add(new JoinNode.EquiJoinClause(B, E));\n List<JoinNode.EquiJoinC... | {
"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_48 | {
"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 testSessionPropertyRules()\n {\n ConnectorAccessControl accessControl = createAccessControl(\"session_property.json\");\n accessControl.checkCanSetCatalogSessionProperty(ADMIN, \"dangerous\");\n accessControl.checkCanSetCatalogSessionProperty(ALICE, \"safe\");... | {
"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 checkCanSetCatalogSessionProperty(ConnectorSecurityContext context, String propertyName)\n {\n if (!canSetSessionProperty(context, propertyName)) {\n denySetCatalogSessionProperty(propertyName);\n }\n }",
"class_method_signature": "FileBasedAccess... | {
"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_1224 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/execution/scheduler/TestBroadcastOutputBufferManager.java",
"identifier": "TestBroadcastOutputBufferManager",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test()\n {\n AtomicReference<OutputBuffers> outputBufferTarget = new AtomicReference<>();\n BroadcastOutputBufferManager hashOutputBufferManager = new BroadcastOutputBufferManager(outputBufferTarget::set);\n assertEquals(outputBufferTarget.get(), createInitial... | {
"fields": [
{
"declarator": "outputBufferTarget",
"modifier": "private final",
"original_string": "private final Consumer<OutputBuffers> outputBufferTarget;",
"type": "Consumer<OutputBuffers>",
"var_name": "outputBufferTarget"
},
{
"declarator": "outputBuffers = creat... | {
"body": "@Override\n public void addOutputBuffers(List<OutputBufferId> newBuffers, boolean noMoreBuffers)\n {\n OutputBuffers newOutputBuffers;\n synchronized (this) {\n if (outputBuffers.isNoMoreBufferIds()) {\n // a stage can move to a final state (e.g., failed) 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_581 | {
"fields": [
{
"declarator": "database",
"modifier": "private",
"original_string": "private TestingDatabase database;",
"type": "TestingDatabase",
"var_name": "database"
},
{
"declarator": "metadata",
"modifier": "private",
"original_string": "private JdbcM... | {
"body": "@Test\n public void testListTables()\n {\n // all schemas\n assertEquals(ImmutableSet.copyOf(metadata.listTables(SESSION, Optional.empty())), ImmutableSet.of(\n new SchemaTableName(\"example\", \"numbers\"),\n new SchemaTableName(\"example\", \"view_source\... | {
"fields": [
{
"declarator": "SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\"",
"modifier": "private static final",
"original_string": "private static final String SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\";",
"type": "String",
"var_name": "SYNTHETIC_COLUMN_NAME_PRE... | {
"body": "@Override\n public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> schemaName)\n {\n return jdbcClient.getTableNames(JdbcIdentity.from(session), schemaName);\n }",
"class_method_signature": "JdbcMetadata.listTables(ConnectorSession session, Optional<String> sch... | {
"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_978 | {
"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 testMoreThanThirtyTwoArguments()\n {\n List<Set<Integer>> groupingSetOrdinals = ImmutableList.of(ImmutableSet.of(20, 2, 13, 33, 40, 9, 14), ImmutableSet.of(28, 4, 5, 29, 31, 10));\n List<Long> expectedResults = ImmutableList.of(822283861886L, 995358664191L);\n\n ... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/sql/planner/GroupingOperationRewriter.java",
"identifier": "GroupingOperationRewriter",
"interfaces": "",
"methods": [
{
"class_method_signature": "GroupingOperationRewriter.GroupingOperationRewriter()",
"constructor": true,
... | {
"body": "static long calculateGrouping(Set<Integer> groupingSet, List<Integer> columns)\n {\n long grouping = (1L << columns.size()) - 1;\n\n for (int index = 0; index < columns.size(); index++) {\n int column = columns.get(index);\n\n if (groupingSet.contains(column)) {\n ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_755 | {
"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 testMergeOutput()\n {\n List<Page> input = rowPagesBuilder(VARCHAR, BIGINT)\n .addSequencePage(100, 0, 0)\n .addSequencePage(100, 0, 0)\n .addSequencePage(100, 0, 0)\n .addSequencePage(100, 0, 0)\n .... | {
"fields": [
{
"declarator": "pages",
"modifier": "private final",
"original_string": "private final WorkProcessor<Page> pages;",
"type": "WorkProcessor<Page>",
"var_name": "pages"
}
],
"file": "presto-main/src/main/java/io/prestosql/operator/FilterAndProjectOperator.java",
... | {
"body": "public static OperatorFactory createOperatorFactory(\n int operatorId,\n PlanNodeId planNodeId,\n Supplier<PageProcessor> processor,\n List<Type> types,\n DataSize minOutputPageSize,\n int minOutputPageRowCount)\n {\n return create... | {
"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_305 | {
"fields": [],
"file": "presto-kafka/src/test/java/io/prestosql/plugin/kafka/TestKafkaPlugin.java",
"identifier": "TestKafkaPlugin",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSpinup()\n {\n KafkaPlugin plugin = new KafkaPlugin();\n\n ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());\n assertInstanceOf(factory, KafkaConnectorFactory.class);\n\n Connector c = factory.create(\n \"test... | {
"fields": [
{
"declarator": "DEFAULT_EXTENSION = binder -> {\n binder.install(new KafkaConsumerModule());\n }",
"modifier": "public static final",
"original_string": "public static final Module DEFAULT_EXTENSION = binder -> {\n binder.install(new KafkaConsumerModule());\n }... | {
"body": "@Override\n public synchronized Iterable<ConnectorFactory> getConnectorFactories()\n {\n return ImmutableList.of(new KafkaConnectorFactory(extension));\n }",
"class_method_signature": "KafkaPlugin.getConnectorFactories()",
"constructor": false,
"full_signature": "@Override public sync... | {
"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_610 | {
"fields": [],
"file": "presto-teradata-functions/src/test/java/io/prestosql/teradata/functions/dateformat/TestDateFormatParser.java",
"identifier": "TestDateFormatParser",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = PrestoException.class)\n public void testInvalidTokenCreate1()\n {\n DateFormatParser.createDateTimeFormatter(\"ala\");\n }",
"class_method_signature": "TestDateFormatParser.testInvalidTokenCreate1()",
"constructor": false,
"full_signature": "@Test(expectedE... | {
"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 DateTimeFormatter createDateTimeFormatter(String format)\n {\n DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();\n for (Token token : tokenize(format)) {\n switch (token.getType()) {\n case DateFormat.TEXT:\n build... | {
"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_240 | {
"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 testStop()\n throws Exception\n {\n File staging = new File(temporary, \"staging\");\n File storage = new File(temporary, \"storage\");\n File quarantine = new File(temporary, \"quarantine\");\n\n assertDirectory(staging);\n assertDire... | {
"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": "@PreDestroy\n public void stop()\n throws IOException\n {\n deleteDirectory(baseStagingDir);\n }",
"class_method_signature": "FileStorageService.stop()",
"constructor": false,
"full_signature": "@PreDestroy public void stop()",
"identifier": "stop",
"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_493 | {
"fields": [],
"file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestDomain.java",
"identifier": "TestDomain",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntersect()\n {\n assertEquals(\n Domain.all(BIGINT).intersect(Domain.all(BIGINT)),\n Domain.all(BIGINT));\n\n assertEquals(\n Domain.none(BIGINT).intersect(Domain.none(BIGINT)),\n Domain.none(BIGINT));\... | {
"fields": [
{
"declarator": "DEFAULT_COMPACTION_THRESHOLD = 32",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_COMPACTION_THRESHOLD = 32;",
"type": "int",
"var_name": "DEFAULT_COMPACTION_THRESHOLD"
},
{
"declarator": "values",
... | {
"body": "public Domain intersect(Domain other)\n {\n checkCompatibility(other);\n return new Domain(values.intersect(other.getValues()), this.isNullAllowed() && other.isNullAllowed());\n }",
"class_method_signature": "Domain.intersect(Domain other)",
"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_169 | {
"fields": [
{
"declarator": "ROW_OF_ROW_VARIABLE = new Variable(\"a\", rowType(field(\"b\", rowType(field(\"c\", INTEGER)))))",
"modifier": "private static final",
"original_string": "private static final ConnectorExpression ROW_OF_ROW_VARIABLE = new Variable(\"a\", rowType(field(\"b\", rowTyp... | {
"body": "@Test\n public void testIsProjectionSupported()\n {\n assertTrue(isPushDownSupported(ONE_LEVEL_DEREFERENCE));\n assertTrue(isPushDownSupported(TWO_LEVEL_DEREFERENCE));\n assertTrue(isPushDownSupported(INT_VARIABLE));\n assertFalse(isPushDownSupported(CONSTANT));\n }",
... | {
"fields": [],
"file": "presto-hive/src/main/java/io/prestosql/plugin/hive/HiveApplyProjectionUtil.java",
"identifier": "HiveApplyProjectionUtil",
"interfaces": "",
"methods": [
{
"class_method_signature": "HiveApplyProjectionUtil.HiveApplyProjectionUtil()",
"constructor": true,
"full_s... | {
"body": "@VisibleForTesting\n static boolean isPushDownSupported(ConnectorExpression expression)\n {\n return expression instanceof Variable ||\n (expression instanceof FieldDereference && isPushDownSupported(((FieldDereference) expression).getTarget()));\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_539 | {
"fields": [],
"file": "presto-resource-group-managers/src/test/java/io/prestosql/plugin/resourcegroups/TestFileResourceGroupConfig.java",
"identifier": "TestFileResourceGroupConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExplicitPropertyMappings()\n throws IOException\n {\n Path resourceGroupConfigFile = Files.createTempFile(null, null);\n\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"resource-groups.config-file\"... | {
"fields": [
{
"declarator": "configFile",
"modifier": "private",
"original_string": "private String configFile;",
"type": "String",
"var_name": "configFile"
}
],
"file": "presto-resource-group-managers/src/main/java/io/prestosql/plugin/resourcegroups/FileResourceGroupConfig... | {
"body": "@Config(\"resource-groups.config-file\")\n public FileResourceGroupConfig setConfigFile(String configFile)\n {\n this.configFile = configFile;\n return this;\n }",
"class_method_signature": "FileResourceGroupConfig.setConfigFile(String configFile)",
"constructor": false,
"full_... | {
"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_1273 | {
"fields": [],
"file": "presto-parquet/src/test/java/io/prestosql/parquet/predicate/TestPredicateUtils.java",
"identifier": "TestPredicateUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n @SuppressWarnings(\"deprecation\")\n public void testDictionaryEncodingV1()\n {\n Set<Encoding> required = ImmutableSet.of(BIT_PACKED);\n Set<Encoding> optional = ImmutableSet.of(BIT_PACKED, RLE);\n Set<Encoding> repeated = ImmutableSet.of(RLE);\n\n Set<Encoding... | {
"fields": [],
"file": "presto-parquet/src/main/java/io/prestosql/parquet/predicate/PredicateUtils.java",
"identifier": "PredicateUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "PredicateUtils.PredicateUtils()",
"constructor": true,
"full_signature": "private Predic... | {
"body": "@VisibleForTesting\n @SuppressWarnings(\"deprecation\")\n static boolean isOnlyDictionaryEncodingPages(ColumnChunkMetaData columnMetaData)\n {\n // Files written with newer versions of Parquet libraries (e.g. parquet-mr 1.9.0) will have EncodingStats available\n // Otherwise, fallbac... | {
"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_885 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestUrlFunctions.java",
"identifier": "TestUrlFunctions",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testUrlExtractParameter()\n {\n assertFunction(\"url_extract_parameter('http://example.com/path1/p.php?k1=v1&k2=v2&k3&k4#Ref1', 'k1')\", createVarcharType(53), \"v1\");\n assertFunction(\"url_extract_parameter('http://example.com/path1/p.php?k1=v1&k2=v2&k3&k4#Ref1', ... | {
"fields": [
{
"declarator": "QUERY_SPLITTER = Splitter.on('&')",
"modifier": "private static final",
"original_string": "private static final Splitter QUERY_SPLITTER = Splitter.on('&');",
"type": "Splitter",
"var_name": "QUERY_SPLITTER"
},
{
"declarator": "ARG_SPLITTE... | {
"body": "@SqlNullable\n @Description(\"Extract query parameter from url\")\n @ScalarFunction\n @LiteralParameters({\"x\", \"y\"})\n @SqlType(\"varchar(x)\")\n public static Slice urlExtractParameter(@SqlType(\"varchar(x)\") Slice url, @SqlType(\"varchar(y)\") Slice parameterName)\n {\n URI ... | {
"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_186 | {
"fields": [
{
"declarator": "TEST_COLUMN_HANDLE = createBaseColumn(\n \"test\",\n 0,\n HiveType.HIVE_STRING,\n VARCHAR,\n HiveColumnHandle.ColumnType.PARTITION_KEY,\n Optional.empty())",
"modifier": "private static final",
"orig... | {
"body": "@Test\n public void testCreateMixedPredicate()\n {\n ImmutableList.Builder<HivePartition> partitions = ImmutableList.builder();\n\n for (int i = 0; i < 5; i++) {\n partitions.add(new HivePartition(\n new SchemaTableName(\"test\", \"test\"),\n ... | {
"fields": [
{
"declarator": "PRESTO_VERSION_NAME = \"presto_version\"",
"modifier": "public static final",
"original_string": "public static final String PRESTO_VERSION_NAME = \"presto_version\";",
"type": "String",
"var_name": "PRESTO_VERSION_NAME"
},
{
"declarator":... | {
"body": "@VisibleForTesting\n static TupleDomain<ColumnHandle> createPredicate(List<ColumnHandle> partitionColumns, List<HivePartition> partitions)\n {\n if (partitions.isEmpty()) {\n return TupleDomain.none();\n }\n\n return withColumnDomains(\n partitionColumns... | {
"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_313 | {
"fields": [],
"file": "presto-example-http/src/test/java/io/prestosql/plugin/example/TestExampleConfig.java",
"identifier": "TestExampleConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(ExampleConfig.class)\n .setMetadata(null));\n }",
"class_method_signature": "TestExampleConfig.testDefaults()",
"constructor": false,
"full_signature": "@Test public void testDefaults()",
"... | {
"fields": [
{
"declarator": "metadata",
"modifier": "private",
"original_string": "private URI metadata;",
"type": "URI",
"var_name": "metadata"
}
],
"file": "presto-example-http/src/main/java/io/prestosql/plugin/example/ExampleConfig.java",
"identifier": "ExampleConfig",... | {
"body": "@Config(\"metadata-uri\")\n public ExampleConfig setMetadata(URI metadata)\n {\n this.metadata = metadata;\n return this;\n }",
"class_method_signature": "ExampleConfig.setMetadata(URI metadata)",
"constructor": false,
"full_signature": "@Config(\"metadata-uri\") public Example... | {
"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_743 | {
"fields": [
{
"declarator": "TWO = new BigInteger(\"2\")",
"modifier": "private static final",
"original_string": "private static final BigInteger TWO = new BigInteger(\"2\");",
"type": "BigInteger",
"var_name": "TWO"
},
{
"declarator": "TYPE = createDecimalType(38, 0... | {
"body": "@Test(expectedExceptions = ArithmeticException.class)\n public void testOverflowOnOutput()\n {\n addToState(state, TWO.pow(126));\n addToState(state, TWO.pow(126));\n\n assertEquals(state.getOverflow(), 1);\n DecimalSumAggregation.outputLongDecimal(TYPE, state, new Variabl... | {
"fields": [
{
"declarator": "DECIMAL_SUM_AGGREGATION = new DecimalSumAggregation()",
"modifier": "public static final",
"original_string": "public static final DecimalSumAggregation DECIMAL_SUM_AGGREGATION = new DecimalSumAggregation();",
"type": "DecimalSumAggregation",
"var_name"... | {
"body": "public static void outputLongDecimal(DecimalType type, LongDecimalWithOverflowState state, BlockBuilder out)\n {\n if (state.getLongDecimal() == null) {\n out.appendNull();\n }\n else {\n if (state.getOverflow() != 0) {\n throwOverflowException()... | {
"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_1009 | {
"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 testCache()\n {\n PageFunctionCompiler cacheCompiler = new PageFunctionCompiler(METADATA, 100);\n assertSame(\n cacheCompiler.compileProjection(ADD_10_EXPRESSION, Optional.empty()),\n cacheCompiler.compileProjection(ADD_10_EXPRESSION, Op... | {
"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_256 | {
"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 testTemporalCompactionNoCompactionAcrossDays()\n {\n long day1 = Duration.ofDays(Duration.ofNanos(System.nanoTime()).toDays()).toMillis();\n long day2 = Duration.ofDays(Duration.ofMillis(day1).toDays() + 1).toMillis();\n long day3 = Duration.ofDays(Duration.of... | {
"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_606 | {
"fields": [
{
"declarator": "codec = JsonCodec.jsonCodec(MongoTableHandle.class)",
"modifier": "private final",
"original_string": "private final JsonCodec<MongoTableHandle> codec = JsonCodec.jsonCodec(MongoTableHandle.class);",
"type": "JsonCodec<MongoTableHandle>",
"var_name": "c... | {
"body": "@Test\n public void testRoundTrip()\n {\n MongoTableHandle expected = new MongoTableHandle(new SchemaTableName(\"schema\", \"table\"));\n\n String json = codec.toJson(expected);\n MongoTableHandle actual = codec.fromJson(json);\n\n assertEquals(actual.getSchemaTableName(),... | {
"fields": [
{
"declarator": "schemaTableName",
"modifier": "private final",
"original_string": "private final SchemaTableName schemaTableName;",
"type": "SchemaTableName",
"var_name": "schemaTableName"
},
{
"declarator": "constraint",
"modifier": "private final"... | {
"body": "@JsonProperty\n public SchemaTableName getSchemaTableName()\n {\n return schemaTableName;\n }",
"class_method_signature": "MongoTableHandle.getSchemaTableName()",
"constructor": false,
"full_signature": "@JsonProperty public SchemaTableName getSchemaTableName()",
"identifier": "getS... | {
"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_1265 | {
"fields": [],
"file": "presto-bigquery/src/test/java/io/prestosql/plugin/bigquery/TestBigQueryConnectorModule.java",
"identifier": "TestBigQueryConnectorModule",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConfigurationOnly()\n {\n String projectId = BigQueryConnectorModule.calculateBillingProjectId(Optional.of(\"pid\"), Optional.empty());\n assertThat(projectId).isEqualTo(\"pid\");\n }",
"class_method_signature": "TestBigQueryConnectorModule.testConfiguration... | {
"fields": [
{
"declarator": "nodeManager",
"modifier": "private final",
"original_string": "private final NodeManager nodeManager;",
"type": "NodeManager",
"var_name": "nodeManager"
}
],
"file": "presto-bigquery/src/main/java/io/prestosql/plugin/bigquery/BigQueryConnectorMo... | {
"body": "static String calculateBillingProjectId(Optional<String> configParentProjectId, Optional<Credentials> credentials)\n {\n // 1. Get from configuration\n if (configParentProjectId.isPresent()) {\n return configParentProjectId.get();\n }\n // 2. Get from the provided ... | {
"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_485 | {
"fields": [
{
"declarator": "A = new TestingColumnHandle(\"a\")",
"modifier": "private static final",
"original_string": "private static final ColumnHandle A = new TestingColumnHandle(\"a\");",
"type": "ColumnHandle",
"var_name": "A"
},
{
"declarator": "B = new Testin... | {
"body": "@Test\n public void testEquals()\n {\n assertTrue(equals(\n ImmutableMap.of(),\n ImmutableMap.of()));\n\n assertTrue(equals(\n ImmutableMap.of(),\n ImmutableMap.of(A, Domain.all(BIGINT))));\n\n assertFalse(equals(\n ... | {
"fields": [
{
"declarator": "NONE = new TupleDomain<>(Optional.empty())",
"modifier": "private static final",
"original_string": "private static final TupleDomain<?> NONE = new TupleDomain<>(Optional.empty());",
"type": "TupleDomain<?>",
"var_name": "NONE"
},
{
"decla... | {
"body": "@Override\n public boolean equals(Object obj)\n {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n TupleDomain<?> other = (TupleDomain<?>) obj;\n return Objects.equals(thi... | {
"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_190 | {
"fields": [
{
"declarator": "defaultCacheSize = 4096",
"modifier": "private final",
"original_string": "private final int defaultCacheSize = 4096;",
"type": "int",
"var_name": "defaultCacheSize"
},
{
"declarator": "defaultCacheExpireSeconds = Duration.succinctDuration... | {
"body": "@Test\n public void testGetOrgSet()\n {\n String orgs = \"my18CharOrgId,your18CharOrgId, his18CharOrgId ,her18CharOrgId\";\n int expected = (int) orgs.chars().filter(sep -> sep == ',').count() + 1;\n int actual = (new SalesforceConfig()\n .setAllowedOrganizations(o... | {
"fields": [
{
"declarator": "cacheSize = 4096",
"modifier": "private",
"original_string": "private int cacheSize = 4096;",
"type": "int",
"var_name": "cacheSize"
},
{
"declarator": "cacheExpireDuration = Duration.succinctDuration(2, TimeUnit.MINUTES)",
"modifier... | {
"body": "public Set<String> getOrgSet()\n {\n Set<String> tmp = new HashSet<>();\n if (allowedOrganizations == null) {\n allowedOrganizations = \"\";\n }\n String[] orgsSplit = allowedOrganizations.split(\"[,;]\");\n for (String s : orgsSplit) {\n // The o... | {
"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_893 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestColorFunctions.java",
"identifier": "TestColorFunctions",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testBar()\n {\n assertEquals(bar(0.6, 5, color(toSlice(\"#f0f\")), color(toSlice(\"#00f\"))),\n toSlice(\"\\u001B[38;5;201m\\u2588\\u001B[38;5;165m\\u2588\\u001B[38;5;129m\\u2588\\u001B[0m \"));\n\n assertEquals(bar(1, 10, color(toSlice(\"#f00\")), co... | {
"fields": [
{
"declarator": "ANSI_RESET = \"\\u001b[0m\"",
"modifier": "private static final",
"original_string": "private static final String ANSI_RESET = \"\\u001b[0m\";",
"type": "String",
"var_name": "ANSI_RESET"
},
{
"declarator": "RENDERED_TRUE = render(utf8Slic... | {
"body": "@ScalarFunction\n @SqlType(StandardTypes.VARCHAR)\n public static Slice bar(@SqlType(StandardTypes.DOUBLE) double percent, @SqlType(StandardTypes.BIGINT) long width)\n {\n return bar(percent, width, rgb(255, 0, 0), rgb(0, 255, 0));\n }",
"class_method_signature": "ColorFunctions.bar(@S... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_939 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/sql/planner/TestDesugarTryExpressionRewriter.java",
"identifier": "TestDesugarTryExpressionRewriter",
"interfaces": "",
"superclass": "extends BaseRuleTest"
} | {
"body": "@Test\n public void testTryExpressionDesugaringRewriter()\n {\n // 1 + try(2)\n Expression initial = new ArithmeticBinaryExpression(\n ADD,\n new DecimalLiteral(\"1\"),\n new TryExpression(new DecimalLiteral(\"2\")));\n Expression rewr... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/sql/planner/DesugarTryExpressionRewriter.java",
"identifier": "DesugarTryExpressionRewriter",
"interfaces": "",
"methods": [
{
"class_method_signature": "DesugarTryExpressionRewriter.DesugarTryExpressionRewriter()",
"constructor":... | {
"body": "public static Expression rewrite(Expression expression, Metadata metadata, TypeAnalyzer typeAnalyzer, Session session, SymbolAllocator symbolAllocator)\n {\n if (expression instanceof SymbolReference) {\n return expression;\n }\n\n Map<NodeRef<Expression>, Type> expressio... | {
"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_714 | {
"fields": [
{
"declarator": "METADATA = createTestMetadataManager()",
"modifier": "private static final",
"original_string": "private static final Metadata METADATA = createTestMetadataManager();",
"type": "Metadata",
"var_name": "METADATA"
},
{
"declarator": "SIGNATU... | {
"body": "@Test\n public void testSelectsMethodBasedOnReturnType()\n throws Throwable\n {\n SqlScalarFunction function = new PolymorphicScalarFunctionBuilder(TestMethods.class)\n .signature(SIGNATURE)\n .deterministic(true)\n .choice(choice -> choi... | {
"fields": [
{
"declarator": "choices",
"modifier": "private final",
"original_string": "private final List<PolymorphicScalarFunctionChoice> choices;",
"type": "List<PolymorphicScalarFunctionChoice>",
"var_name": "choices"
}
],
"file": "presto-main/src/main/java/io/prestosql... | {
"body": "@Override\n protected ScalarFunctionImplementation specialize(FunctionBinding functionBinding)\n {\n ImmutableList.Builder<ScalarImplementationChoice> implementationChoices = ImmutableList.builder();\n\n for (PolymorphicScalarFunctionChoice choice : choices) {\n implementatio... | {
"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_344 | {
"fields": [
{
"declarator": "TEST_CATALOG = \"test_catalog\"",
"modifier": "private static final",
"original_string": "private static final String TEST_CATALOG = \"test_catalog\";",
"type": "String",
"var_name": "TEST_CATALOG"
},
{
"declarator": "COUNTING_CATALOG = \"... | {
"body": "@Test\n public void testGetColumns()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getColumns(null, null, \"tables\", \"table_name\")) {\n assertColumnMetadata(rs);\n ... | {
"fields": [
{
"declarator": "SEARCH_STRING_ESCAPE = \"\\\\\"",
"modifier": "private static final",
"original_string": "private static final String SEARCH_STRING_ESCAPE = \"\\\\\";",
"type": "String",
"var_name": "SEARCH_STRING_ESCAPE"
},
{
"declarator": "connection",
... | {
"body": "@Override\n public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)\n throws SQLException\n {\n StringBuilder query = new StringBuilder(\"\" +\n \"SELECT TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA... | {
"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_651 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestSingleAccessMethodCompiler.java",
"identifier": "TestSingleAccessMethodCompiler",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBasic()\n throws ReflectiveOperationException\n {\n LongUnaryOperator addOne = compileSingleAccessMethod(\n \"AddOne\",\n LongUnaryOperator.class,\n lookup().findStatic(TestSingleAccessMethodCompiler.class, \"incre... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/type/SingleAccessMethodCompiler.java",
"identifier": "SingleAccessMethodCompiler",
"interfaces": "",
"methods": [
{
"class_method_signature": "SingleAccessMethodCompiler.SingleAccessMethodCompiler()",
"constructor": true,
"f... | {
"body": "public static <T> T compileSingleAccessMethod(String suggestedClassName, Class<T> interfaceType, MethodHandle methodHandle)\n {\n ClassDefinition classDefinition = new ClassDefinition(\n a(PUBLIC, FINAL, SYNTHETIC),\n makeClassName(suggestedClassName),\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_201 | {
"fields": [],
"file": "presto-password-authenticators/src/test/java/io/prestosql/plugin/password/file/TestEncryptionUtil.java",
"identifier": "TestEncryptionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testHashingAlgorithmBCrypt()\n {\n String password = \"$2y$10$BqTb8hScP5DfcpmHo5PeyugxHz5Ky/qf3wrpD7SNm8sWuA3VlGqsa\";\n assertEquals(getHashingAlgorithm(password), BCRYPT);\n }",
"class_method_signature": "TestEncryptionUtil.testHashingAlgorithmBCrypt()",
"co... | {
"fields": [
{
"declarator": "BCRYPT_MIN_COST = 8",
"modifier": "private static final",
"original_string": "private static final int BCRYPT_MIN_COST = 8;",
"type": "int",
"var_name": "BCRYPT_MIN_COST"
},
{
"declarator": "PBKDF2_MIN_ITERATIONS = 1000",
"modifier":... | {
"body": "public static HashingAlgorithm getHashingAlgorithm(String password)\n {\n if (password.startsWith(\"$2y\")) {\n if (getBCryptCost(password) < BCRYPT_MIN_COST) {\n throw new HashedPasswordException(\"Minimum cost of BCrypt password must be \" + BCRYPT_MIN_COST);\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_128 | {
"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 testDefaultCredentials()\n throws Exception\n {\n Configuration config = new Configuration(false);\n\n try (PrestoS3FileSystem fs = new PrestoS3FileSystem()) {\n fs.initialize(new URI(\"s3n://test-bucket/\"), config);\n assertInstance... | {
"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_578 | {
"fields": [
{
"declarator": "database",
"modifier": "private",
"original_string": "private TestingDatabase database;",
"type": "TestingDatabase",
"var_name": "database"
},
{
"declarator": "metadata",
"modifier": "private",
"original_string": "private JdbcM... | {
"body": "@Test\n public void testGetTableHandle()\n {\n JdbcTableHandle tableHandle = metadata.getTableHandle(SESSION, new SchemaTableName(\"example\", \"numbers\"));\n assertEquals(metadata.getTableHandle(SESSION, new SchemaTableName(\"example\", \"numbers\")), tableHandle);\n assertNull... | {
"fields": [
{
"declarator": "SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\"",
"modifier": "private static final",
"original_string": "private static final String SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\";",
"type": "String",
"var_name": "SYNTHETIC_COLUMN_NAME_PRE... | {
"body": "@Override\n public JdbcTableHandle getTableHandle(ConnectorSession session, SchemaTableName tableName)\n {\n return jdbcClient.getTableHandle(JdbcIdentity.from(session), tableName)\n .orElse(null);\n }",
"class_method_signature": "JdbcMetadata.getTableHandle(ConnectorSessio... | {
"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_1232 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/event/TestQueryMonitorConfig.java",
"identifier": "TestQueryMonitorConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(QueryMonitorConfig.class)\n .setMaxOutputStageJsonSize(DataSize.of(16, Unit.MEGABYTE)));\n }",
"class_method_signature": "TestQueryMonitorConfig.testDefaults()",
"constructor": false,
"full_s... | {
"fields": [
{
"declarator": "maxOutputStageJsonSize = DataSize.of(16, Unit.MEGABYTE)",
"modifier": "private",
"original_string": "private DataSize maxOutputStageJsonSize = DataSize.of(16, Unit.MEGABYTE);",
"type": "DataSize",
"var_name": "maxOutputStageJsonSize"
}
],
"file"... | {
"body": "@Config(\"event.max-output-stage-size\")\n public QueryMonitorConfig setMaxOutputStageJsonSize(DataSize maxOutputStageJsonSize)\n {\n this.maxOutputStageJsonSize = maxOutputStageJsonSize;\n return this;\n }",
"class_method_signature": "QueryMonitorConfig.setMaxOutputStageJsonSize(D... | {
"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_981 | {
"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 testGroupByEmpty()\n {\n PlanNode node = new AggregationNode(\n newId(),\n filter(baseTableScan, FALSE_LITERAL),\n ImmutableMap.of(),\n globalAggregation(),\n ImmutableList.of(),\n Agg... | {
"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_597 | {
"fields": [
{
"declarator": "tempDirectory",
"modifier": "private",
"original_string": "private Path tempDirectory;",
"type": "Path",
"var_name": "tempDirectory"
}
],
"file": "presto-hive-hadoop2/src/test/java/io/prestosql/plugin/hive/TestHiveHadoop2Plugin.java",
"identif... | {
"body": "@Test\n public void testRubixCache()\n {\n Plugin plugin = new HiveHadoop2Plugin();\n ConnectorFactory connectorFactory = Iterables.getOnlyElement(plugin.getConnectorFactories());\n\n connectorFactory.create(\n \"test\",\n ImmutableMap.<String, Strin... | {
"fields": [],
"file": "presto-hive-hadoop2/src/main/java/io/prestosql/plugin/hive/HiveHadoop2Plugin.java",
"identifier": "HiveHadoop2Plugin",
"interfaces": "implements Plugin",
"methods": [
{
"class_method_signature": "HiveHadoop2Plugin.getConnectorFactories()",
"constructor": false,
"... | {
"body": "@Override\n public Iterable<ConnectorFactory> getConnectorFactories()\n {\n return ImmutableList.of(new HiveConnectorFactory(\"hive-hadoop2\"));\n }",
"class_method_signature": "HiveHadoop2Plugin.getConnectorFactories()",
"constructor": false,
"full_signature": "@Override public Itera... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_2 | {
"fields": [],
"file": "presto-client/src/test/java/io/prestosql/client/TestIntervalYearMonth.java",
"identifier": "TestIntervalYearMonth",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFormat()\n {\n assertMonths(0, \"0-0\");\n assertMonths(toMonths(0, 0), \"0-0\");\n\n assertMonths(3, \"0-3\");\n assertMonths(-3, \"-0-3\");\n assertMonths(toMonths(0, 3), \"0-3\");\n assertMonths(toMonths(0, -3), \"-0-3\");\n\n ... | {
"fields": [
{
"declarator": "INT_MIN_VALUE = \"-178956970-8\"",
"modifier": "private static final",
"original_string": "private static final String INT_MIN_VALUE = \"-178956970-8\";",
"type": "String",
"var_name": "INT_MIN_VALUE"
},
{
"declarator": "FORMAT = Pattern.c... | {
"body": "public static int toMonths(int year, int months)\n {\n try {\n return addExact(multiplyExact(year, 12), months);\n }\n catch (ArithmeticException e) {\n throw new IllegalArgumentException(e);\n }\n }",
"class_method_signature": "IntervalYearMonth.to... | {
"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_919 | {
"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 testFromAndPredicate()\n {\n Expression originalPredicate = and(\n and(greaterThan(C_BIGINT, bigintLiteral(1L)), unprocessableExpression1(C_BIGINT)),\n and(lessThan(C_BIGINT, bigintLiteral(5L)), unprocessableExpression2(C_BIGINT)));\n Ex... | {
"fields": [
{
"declarator": "metadata",
"modifier": "private final",
"original_string": "private final Metadata metadata;",
"type": "Metadata",
"var_name": "metadata"
},
{
"declarator": "literalEncoder",
"modifier": "private final",
"original_string": "pri... | {
"body": "public static ExtractionResult fromPredicate(\n Metadata metadata,\n TypeOperators typeOperators,\n Session session,\n Expression predicate,\n TypeProvider types)\n {\n return new Visitor(metadata, typeOperators, session, types, new TypeAnaly... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_29 | {
"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 testTableRulesForCheckCanInsertIntoTable()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-table.json\");\n\n accessControl.checkCanInsertIntoTable(BOB, new CatalogSchemaTableName(\"some-catalog\", \"bobschema\", \... | {
"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 checkCanInsertIntoTable(SystemSecurityContext context, CatalogSchemaTableName table)\n {\n if (!checkTablePermission(context, table, INSERT)) {\n denyInsertTable(table.toString());\n }\n }",
"class_method_signature": "FileBasedSystemAccessControl.... | {
"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_1245 | {
"fields": [],
"file": "presto-orc/src/test/java/io/prestosql/orc/metadata/statistics/TestIntegerStatisticsBuilder.java",
"identifier": "TestIntegerStatisticsBuilder",
"interfaces": "",
"superclass": "extends AbstractStatisticsBuilderTest<IntegerStatisticsBuilder, Long>"
} | {
"body": "@Test\n public void testMergeOverflow()\n {\n List<ColumnStatistics> statisticsList = new ArrayList<>();\n\n statisticsList.add(new IntegerStatisticsBuilder(new NoOpBloomFilterBuilder()).buildColumnStatistics());\n assertMergedIntegerStatistics(statisticsList, 0, 0L);\n\n ... | {
"fields": [
{
"declarator": "nonNullValueCount",
"modifier": "private",
"original_string": "private long nonNullValueCount;",
"type": "long",
"var_name": "nonNullValueCount"
},
{
"declarator": "minimum = Long.MAX_VALUE",
"modifier": "private",
"original_st... | {
"body": "@Override\n public ColumnStatistics buildColumnStatistics()\n {\n Optional<IntegerStatistics> integerStatistics = buildIntegerStatistics();\n return new ColumnStatistics(\n nonNullValueCount,\n integerStatistics.map(s -> INTEGER_VALUE_BYTES).orElse(0L),\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_276 | {
"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 testQueryDividedIntoSplitsFirstSplitHasRightTime()\n throws URISyntaxException\n {\n Instant now = LocalDateTime.of(2019, 10, 2, 7, 26, 56, 0).toInstant(UTC);\n PrometheusConnectorConfig config = getCommonConfig(prometheusHttpServer.resolve(\"/prometheus-d... | {
"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_626 | {
"fields": [
{
"declarator": "TYPE_OPERATORS_CACHE = new TypeOperators()",
"modifier": "private static final",
"original_string": "private static final TypeOperators TYPE_OPERATORS_CACHE = new TypeOperators();",
"type": "TypeOperators",
"var_name": "TYPE_OPERATORS_CACHE"
}
],
... | {
"body": "@Test\n public void testMergeSortYieldingProgresses()\n {\n DriverYieldSignal yieldSignal = new DriverYieldSignal();\n yieldSignal.forceYieldForTesting();\n List<Type> types = ImmutableList.of(INTEGER);\n WorkProcessor<Page> mergedPages = MergeSortedPages.mergeSortedPages(... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/util/MergeSortedPages.java",
"identifier": "MergeSortedPages",
"interfaces": "",
"methods": [
{
"class_method_signature": "MergeSortedPages.MergeSortedPages()",
"constructor": true,
"full_signature": "private MergeSortedPag... | {
"body": "private MergeSortedPages() {}",
"class_method_signature": "MergeSortedPages.MergeSortedPages()",
"constructor": true,
"full_signature": "private MergeSortedPages()",
"identifier": "MergeSortedPages",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature"... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_333 | {
"fields": [],
"file": "presto-jdbc/src/test/java/io/prestosql/jdbc/TestPrestoDriverUri.java",
"identifier": "TestPrestoDriverUri",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUriWithExtraCredentials()\n throws SQLException\n {\n String extraCredentials = \"test.token.foo:bar;test.token.abc:xyz\";\n PrestoDriverUri parameters = createDriverUri(\"presto://localhost:8080?extraCredentials=\" + extraCredentials);\n Proper... | {
"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_299 | {
"fields": [
{
"declarator": "TABLE_NAME = \"java.lang:type=classloading\"",
"modifier": "private static final",
"original_string": "private static final String TABLE_NAME = \"java.lang:type=classloading\";",
"type": "String",
"var_name": "TABLE_NAME"
},
{
"declarator"... | {
"body": "@Test\n public void testWildCardPatterns()\n {\n JmxHistoricalData jmxHistoricalData = new JmxHistoricalData(MAX_ENTRIES, ImmutableSet.of(\"java.lang:type=c*\"), getPlatformMBeanServer());\n\n assertEquals(jmxHistoricalData.getTables(), ImmutableSet.of(\"java.lang:type=classloading\", \... | {
"fields": [
{
"declarator": "tables",
"modifier": "private final",
"original_string": "private final Set<String> tables;",
"type": "Set<String>",
"var_name": "tables"
},
{
"declarator": "tableData = new HashMap<>()",
"modifier": "private final",
"original_... | {
"body": "public Set<String> getTables()\n {\n return tables;\n }",
"class_method_signature": "JmxHistoricalData.getTables()",
"constructor": false,
"full_signature": "public Set<String> getTables()",
"identifier": "getTables",
"invocations": [],
"modifiers": "public",
"parameters": "()",
... | {
"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_763 | {
"fields": [
{
"declarator": "TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE)",
"modifier": "private static final",
"original_string": "private static final List<Type> TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE);",
"type": "List<Type>",
"var_name": "TYPES"
}
],
"file": "pr... | {
"body": "@Test\n public void testFlushOnFullPage()\n {\n int singlePageRowCount = 10;\n List<Type> types = ImmutableList.of(BIGINT);\n Page page = createSequencePage(types, singlePageRowCount * 2);\n List<Page> splits = splitPage(page, page.getSizeInBytes() / 2);\n\n WorkPro... | {
"fields": [
{
"declarator": "MAX_MIN_PAGE_SIZE = 1024 * 1024",
"modifier": "private static final",
"original_string": "private static final int MAX_MIN_PAGE_SIZE = 1024 * 1024;",
"type": "int",
"var_name": "MAX_MIN_PAGE_SIZE"
}
],
"file": "presto-main/src/main/java/io/prest... | {
"body": "private MergePages() {}",
"class_method_signature": "MergePages.MergePages()",
"constructor": true,
"full_signature": "private MergePages()",
"identifier": "MergePages",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " MergePages()",
"testcase... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1029 | {
"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 testGroupByOrdinalsWithWildcard()\n {\n // TODO: verify output\n analyze(\"SELECT t1.*, a FROM t1 GROUP BY 1,2,c,d\");\n }",
"class_method_signature": "TestAnalyzer.testGroupByOrdinalsWithWildcard()",
"constructor": false,
"full_signature": "@Test public voi... | {
"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_1183 | {
"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 testBufferPeakMemoryUsage()\n {\n PartitionedOutputBuffer buffer = createPartitionedBuffer(\n createInitialEmptyOutputBuffers(PARTITIONED)\n .withBuffer(FIRST, 0)\n .withNoMoreBufferIds(),\n sizeOfP... | {
"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 long getPeakMemoryUsage()\n {\n return memoryManager.getPeakMemoryUsage();\n }",
"class_method_signature": "PartitionedOutputBuffer.getPeakMemoryUsage()",
"constructor": false,
"full_signature": "@Override public long getPeakMemoryUsage()",
"identifier": "getPeakM... | {
"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_91 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java",
"identifier": "TestProtoUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testStorageFormat()\n {\n alluxio.grpc.table.layout.hive.StorageFormat.Builder storageFormat = TestingAlluxioMetastoreObjects.getTestingStorageFormat();\n StorageFormat fmt = ProtoUtils.fromProto(storageFormat.build());\n assertEquals(storageFormat.getSerde(),... | {
"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_108 | {
"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 testGetAllDatabases()\n {\n assertEquals(mockClient.getAccessCount(), 0);\n assertEquals(metastore.getAllDatabases(), ImmutableList.of(TEST_DATABASE));\n assertEquals(mockClient.getAccessCount(), 1);\n assertEquals(metastore.getAllDatabases(), Immutable... | {
"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 List<String> getAllDatabases()\n {\n return get(databaseNamesCache, \"\");\n }",
"class_method_signature": "CachingHiveMetastore.getAllDatabases()",
"constructor": false,
"full_signature": "@Override public List<String> getAllDatabases()",
"identifier": "getAllDat... | {
"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_558 | {
"fields": [],
"file": "presto-cassandra/src/test/java/io/prestosql/plugin/cassandra/util/TestHostAddressFactory.java",
"identifier": "TestHostAddressFactory",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToHostAddressList()\n throws Exception\n {\n Set<Host> hosts = ImmutableSet.of(\n new TestHost(\n new InetSocketAddress(\n InetAddress.getByAddress(new byte[] {\n ... | {
"fields": [
{
"declarator": "hostMap = new HashMap<>()",
"modifier": "private final",
"original_string": "private final Map<String, HostAddress> hostMap = new HashMap<>();",
"type": "Map<String, HostAddress>",
"var_name": "hostMap"
}
],
"file": "presto-cassandra/src/main/ja... | {
"body": "public List<HostAddress> toHostAddressList(Collection<Host> hosts)\n {\n ArrayList<HostAddress> list = new ArrayList<>(hosts.size());\n for (Host host : hosts) {\n list.add(toHostAddress(host));\n }\n return list;\n }",
"class_method_signature": "HostAddressFa... | {
"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_1212 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/execution/scheduler/TestPhasedExecutionSchedule.java",
"identifier": "TestPhasedExecutionSchedule",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExchange()\n {\n PlanFragment aFragment = createTableScanPlanFragment(\"a\");\n PlanFragment bFragment = createTableScanPlanFragment(\"b\");\n PlanFragment cFragment = createTableScanPlanFragment(\"c\");\n PlanFragment exchangeFragment = createExcha... | {
"fields": [
{
"declarator": "schedulePhases",
"modifier": "private final",
"original_string": "private final List<Set<SqlStageExecution>> schedulePhases;",
"type": "List<Set<SqlStageExecution>>",
"var_name": "schedulePhases"
},
{
"declarator": "activeSources = new Has... | {
"body": "@VisibleForTesting\n static List<Set<PlanFragmentId>> extractPhases(Collection<PlanFragment> fragments)\n {\n // Build a graph where the plan fragments are vertexes and the edges represent\n // a before -> after relationship. For example, a join hash build has an edge\n // to th... | {
"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_671 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java",
"identifier": "TestSmallintOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testCastToTinyint()\n {\n assertFunction(\"cast(SMALLINT'37' as tinyint)\", TINYINT, (byte) 37);\n assertFunction(\"cast(SMALLINT'17' as tinyint)\", TINYINT, (byte) 17);\n }",
"class_method_signature": "TestSmallintOperators.testCastToTinyint()",
"constructor"... | {
"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.TINYINT)\n public static long castToTinyint(@SqlType(StandardTypes.SMALLINT) long value)\n {\n try {\n return SignedBytes.checkedCast(value);\n }\n catch (IllegalArgumentException e) {\n throw new PrestoExcep... | {
"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_221 | {
"fields": [
{
"declarator": "DEFAULT_TEST_ORDERS = new SchemaTableName(\"test\", \"orders\")",
"modifier": "private static final",
"original_string": "private static final SchemaTableName DEFAULT_TEST_ORDERS = new SchemaTableName(\"test\", \"orders\");",
"type": "SchemaTableName",
... | {
"body": "@Test\n public void testNoTableFilter()\n {\n // Create \"orders\" table in a different schema\n createTable(tableMetadataBuilder(new SchemaTableName(\"test\", \"orders2\"))\n .column(\"orderkey\", BIGINT)\n .build());\n\n // Create another table tha... | {
"fields": [
{
"declarator": "SHARD_UUID = \"shard_uuid\"",
"modifier": "private static final",
"original_string": "private static final String SHARD_UUID = \"shard_uuid\";",
"type": "String",
"var_name": "SHARD_UUID"
},
{
"declarator": "XXHASH64 = \"xxhash64\"",
... | {
"body": "@VisibleForTesting\n static Iterator<Long> getTableIds(IDBI dbi, TupleDomain<Integer> tupleDomain)\n {\n Map<Integer, Domain> domains = tupleDomain.getDomains().get();\n Domain schemaNameDomain = domains.get(getColumnIndex(SHARD_METADATA, SCHEMA_NAME));\n Domain tableNameDomain =... | {
"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_1091 | {
"fields": [
{
"declarator": "inputStatistics",
"modifier": "private",
"original_string": "private PlanNodeStatsEstimate inputStatistics;",
"type": "PlanNodeStatsEstimate",
"var_name": "inputStatistics"
},
{
"declarator": "uStats",
"modifier": "private",
"o... | {
"body": "@Test\n public void testSemiJoin()\n {\n // overlapping ranges\n assertThat(computeSemiJoin(inputStatistics, inputStatistics, x, w))\n .symbolStats(x, stats -> stats\n .lowValue(xStats.getLowValue())\n .highValue(xStats.getHig... | {
"fields": [
{
"declarator": "MIN_ANTI_JOIN_FILTER_COEFFICIENT = 0.5",
"modifier": "private static final",
"original_string": "private static final double MIN_ANTI_JOIN_FILTER_COEFFICIENT = 0.5;",
"type": "double",
"var_name": "MIN_ANTI_JOIN_FILTER_COEFFICIENT"
}
],
"file": ... | {
"body": "public static PlanNodeStatsEstimate computeSemiJoin(PlanNodeStatsEstimate sourceStats, PlanNodeStatsEstimate filteringSourceStats, Symbol sourceJoinSymbol, Symbol filteringSourceJoinSymbol)\n {\n return compute(sourceStats, filteringSourceStats, sourceJoinSymbol, filteringSourceJoinSymbol,\n ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_734 | {
"fields": [
{
"declarator": "BLOCK_TYPE_OPERATORS = new BlockTypeOperators(new TypeOperators())",
"modifier": "private static final",
"original_string": "private static final BlockTypeOperators BLOCK_TYPE_OPERATORS = new BlockTypeOperators(new TypeOperators());",
"type": "BlockTypeOperat... | {
"body": "@Test\n public void testConstructor()\n {\n for (int i = -2; i <= -1; i++) {\n try {\n //noinspection ResultOfObjectAllocationIgnored\n createEqualityTypedSet(BIGINT, i);\n fail(\"Should throw exception if expectedSize < 0\");\n ... | {
"fields": [
{
"declarator": "MAX_FUNCTION_MEMORY = DataSize.of(4, MEGABYTE)",
"modifier": "@VisibleForTesting\n public static final",
"original_string": "@VisibleForTesting\n public static final DataSize MAX_FUNCTION_MEMORY = DataSize.of(4, MEGABYTE);",
"type": "DataSize",
"v... | {
"body": "public static TypedSet createEqualityTypedSet(\n Type elementType,\n BlockPositionEqual elementEqualOperator,\n BlockPositionHashCode elementHashCodeOperator,\n int expectedSize,\n String functionName)\n {\n return createEqualityTypedSet(\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_364 | {
"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 testPossibleExponentialBacktracking()\n {\n createExpression(\"(((((((((((((((((((((((((((true)))))))))))))))))))))))))))\");\n }",
"class_method_signature": "TestSqlParser.testPossibleExponentialBacktracking()",
"constructor": false,
"full_signature": "@Test publi... | {
"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 Expression createExpression(String expression, ParsingOptions parsingOptions)\n {\n return (Expression) invokeParser(\"expression\", expression, SqlBaseParser::standaloneExpression, parsingOptions);\n }",
"class_method_signature": "SqlParser.createExpression(String expression, Parsing... | {
"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_87 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java",
"identifier": "TestProtoUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testTable()\n {\n alluxio.grpc.table.TableInfo.Builder table = TestingAlluxioMetastoreObjects.getTestingTableInfo();\n alluxio.grpc.table.FieldSchema fieldSchema = TestingAlluxioMetastoreObjects.getTestingFieldSchema().build();\n Table t = ProtoUtils.fromProto... | {
"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_958 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestPruneApplyCorrelation.java",
"identifier": "TestPruneApplyCorrelation",
"interfaces": "",
"superclass": "extends BaseRuleTest"
} | {
"body": "@Test\n public void testPruneCorrelationSymbolNotReferencedInSubquery()\n {\n tester().assertThat(new PruneApplyCorrelation())\n .on(p -> {\n Symbol a = p.symbol(\"a\");\n Symbol inputSymbol = p.symbol(\"input_symbol\");\n ... | {
"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> subquerySymbols = extractUnique(applyNode.getSubquery(), context.getLookup());\n List<Symbol> newCorrelation = applyNode.getCorrelation().stream()\n .filter(subquery... | {
"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_68 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java",
"identifier": "TestGlueExpressionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildGlueExpressionTupleDomainEqualAndRangeLong()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addBigintValues(\"col1\", 3L)\n .addRanges(\"col1\", Range.greaterThan(BIGINT, 100L))\n .addRanges(\"col1\",... | {
"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_1204 | {
"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 testForceFreeMemory()\n {\n ArbitraryOutputBuffer buffer = createArbitraryBuffer(createInitialEmptyOutputBuffers(ARBITRARY), sizeOfPages(10));\n for (int i = 0; i < 3; i++) {\n addPage(buffer, createPage(i));\n }\n OutputBufferMemoryManager m... | {
"fields": [
{
"declarator": "memoryManager",
"modifier": "private final",
"original_string": "private final OutputBufferMemoryManager memoryManager;",
"type": "OutputBufferMemoryManager",
"var_name": "memoryManager"
},
{
"declarator": "outputBuffers = createInitialEmp... | {
"body": "@VisibleForTesting\n void forceFreeMemory()\n {\n memoryManager.close();\n }",
"class_method_signature": "ArbitraryOutputBuffer.forceFreeMemory()",
"constructor": false,
"full_signature": "@VisibleForTesting void forceFreeMemory()",
"identifier": "forceFreeMemory",
"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_1087 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/cost/TestCostComparator.java",
"identifier": "TestCostComparator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnknownCost()\n {\n CostComparator costComparator = new CostComparator(1.0, 1.0, 1.0);\n Session session = testSessionBuilder().build();\n assertThrows(IllegalArgumentException.class, () -> costComparator.compare(session, PlanCostEstimate.zero(), PlanCostE... | {
"fields": [
{
"declarator": "cpuWeight",
"modifier": "private final",
"original_string": "private final double cpuWeight;",
"type": "double",
"var_name": "cpuWeight"
},
{
"declarator": "memoryWeight",
"modifier": "private final",
"original_string": "privat... | {
"body": "public int compare(Session session, PlanCostEstimate left, PlanCostEstimate right)\n {\n requireNonNull(session, \"session is null\");\n requireNonNull(left, \"left is null\");\n requireNonNull(right, \"right is null\");\n checkArgument(!left.hasUnknownComponents() && !right.... | {
"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_237 | {
"fields": [],
"file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/metadata/TestAssignmentLimiter.java",
"identifier": "TestAssignmentLimiter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testLimiter()\n {\n TestingTicker ticker = new TestingTicker();\n AssignmentLimiter limiter = new AssignmentLimiter(\n ImmutableSet::of,\n ticker,\n new Duration(5, MINUTES),\n new Duration(10, MINUTES));\n\... | {
"fields": [
{
"declarator": "log = Logger.get(AssignmentLimiter.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(AssignmentLimiter.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "nodeSuppli... | {
"body": "public synchronized void checkAssignFrom(String nodeIdentifier)\n {\n if (offlineNodes.contains(nodeIdentifier)) {\n return;\n }\n\n long now = ticker.read();\n long start = delayedNodes.computeIfAbsent(nodeIdentifier, key -> now);\n Duration delay = new Dur... | {
"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_667 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java",
"identifier": "TestSmallintOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testDivide()\n {\n assertFunction(\"SMALLINT'37' / SMALLINT'37'\", SMALLINT, (short) 1);\n assertFunction(\"SMALLINT'37' / SMALLINT'17'\", SMALLINT, (short) (37 / 17));\n assertFunction(\"SMALLINT'17' / SMALLINT'37'\", SMALLINT, (short) (17 / 37));\n as... | {
"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(DIVIDE)\n @SqlType(StandardTypes.SMALLINT)\n public static long divide(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right)\n {\n try {\n return left / right;\n }\n catch (ArithmeticException e) {\n thro... | {
"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_688 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java",
"identifier": "TestIntegerOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testCastToTinyint()\n {\n assertFunction(\"cast(INTEGER'37' as tinyint)\", TINYINT, (byte) 37);\n assertFunction(\"cast(INTEGER'17' as tinyint)\", TINYINT, (byte) 17);\n }",
"class_method_signature": "TestIntegerOperators.testCastToTinyint()",
"constructor": f... | {
"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.TINYINT)\n public static long castToTinyint(@SqlType(StandardTypes.INTEGER) long value)\n {\n try {\n return SignedBytes.checkedCast(value);\n }\n catch (IllegalArgumentException e) {\n throw new PrestoExcept... | {
"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_372 | {
"fields": [
{
"declarator": "factory = new GeometryStateFactory()",
"modifier": "private final",
"original_string": "private final GeometryStateFactory factory = new GeometryStateFactory();",
"type": "GeometryStateFactory",
"var_name": "factory"
}
],
"file": "presto-geospat... | {
"body": "@Test\n public void testCreateSingleStateEmpty()\n {\n GeometryState state = factory.createSingleState();\n assertNull(state.getGeometry());\n assertEquals(0, state.getEstimatedSize());\n }",
"class_method_signature": "TestGeometryStateFactory.testCreateSingleStateEmpty()",
... | {
"fields": [
{
"declarator": "OGC_GEOMETRY_BASE_INSTANCE_SIZE = ClassLayout.parseClass(OGCGeometry.class).instanceSize()",
"modifier": "private static final",
"original_string": "private static final long OGC_GEOMETRY_BASE_INSTANCE_SIZE = ClassLayout.parseClass(OGCGeometry.class).instanceSize()... | {
"body": "@Override\n public GeometryState createSingleState()\n {\n return new SingleGeometryState();\n }",
"class_method_signature": "GeometryStateFactory.createSingleState()",
"constructor": false,
"full_signature": "@Override public GeometryState createSingleState()",
"identifier": "creat... | {
"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_722 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/metadata/TestFunctionRegistry.java",
"identifier": "TestFunctionRegistry",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = \"'sum' is both an aggregation and a scalar function\")\n public void testConflictingScalarAggregation()\n {\n List<SqlFunction> functions = new FunctionListBuilder()\n .scalars(ScalarSum.c... | {
"fields": [
{
"declarator": "specializedScalarCache",
"modifier": "private final",
"original_string": "private final Cache<FunctionBinding, ScalarFunctionImplementation> specializedScalarCache;",
"type": "Cache<FunctionBinding, ScalarFunctionImplementation>",
"var_name": "specializ... | {
"body": "public final synchronized void addFunctions(List<? extends SqlFunction> functions)\n {\n for (SqlFunction function : functions) {\n String name = function.getFunctionMetadata().getSignature().getName();\n if (isOperatorName(name) && !(function instanceof GenericEqualOperator... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1068 | {
"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 testLambdaWithSubqueryInOrderBy()\n {\n analyze(\"SELECT a FROM t1 ORDER BY (SELECT apply(0, x -> x + a))\");\n analyze(\"SELECT a AS output_column FROM t1 ORDER BY (SELECT apply(0, x -> x + output_column))\");\n analyze(\"SELECT count(*) FROM t1 GROUP BY a OR... | {
"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_149 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/util/TestHiveUtil.java",
"identifier": "TestHiveUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseHiveTimestamp()\n {\n DateTime time = new DateTime(2011, 5, 6, 7, 8, 9, 123, DateTimeZone.UTC);\n assertEquals(parse(time, \"yyyy-MM-dd HH:mm:ss\"), unixTime(time, 0));\n assertEquals(parse(time, \"yyyy-MM-dd HH:mm:ss.S\"), unixTime(time, 1));\n ... | {
"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 long parseHiveTimestamp(String value)\n {\n return HIVE_TIMESTAMP_PARSER.parseMillis(value) * MICROSECONDS_PER_MILLISECOND;\n }",
"class_method_signature": "HiveUtil.parseHiveTimestamp(String value)",
"constructor": false,
"full_signature": "public static long parseHiveTime... | {
"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_519 | {
"fields": [],
"file": "presto-cli/src/test/java/io/prestosql/cli/TestAlignedTablePrinter.java",
"identifier": "TestAlignedTablePrinter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAlignedPrintingNoRows()\n throws Exception\n {\n List<Column> columns = ImmutableList.<Column>builder()\n .add(column(\"first\", VARCHAR))\n .add(column(\"last\", VARCHAR))\n .build();\n StringWriter writer ... | {
"fields": [
{
"declarator": "NUMERIC_TYPES = ImmutableSet.of(TINYINT, SMALLINT, INTEGER, BIGINT, REAL, DOUBLE, DECIMAL)",
"modifier": "private static final",
"original_string": "private static final Set<String> NUMERIC_TYPES = ImmutableSet.of(TINYINT, SMALLINT, INTEGER, BIGINT, REAL, DOUBLE, D... | {
"body": "@Override\n public void finish()\n throws IOException\n {\n printRows(ImmutableList.of(), true);\n writer.append(format(\"(%s row%s)%n\", rowCount, (rowCount != 1) ? \"s\" : \"\"));\n writer.flush();\n }",
"class_method_signature": "AlignedTablePrinter.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_1253 | {
"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 testTimestampMillis()\n {\n assertThat(getDomain(TIMESTAMP_MILLIS, 0, null))\n .isEqualTo(none(TIMESTAMP_MILLIS));\n assertThat(getDomain(TIMESTAMP_MILLIS, 10, null))\n .isEqualTo(all(TIMESTAMP_MILLIS));\n\n assertThat(getDomain(T... | {
"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_630 | {
"fields": [
{
"declarator": "blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde()",
"modifier": "private final",
"original_string": "private final BlockEncodingSerde blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde();",
"type": "BlockEncodingSerd... | {
"body": "@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = \"No spill paths configured\")\n public void throwIfNoSpillPaths()\n {\n List<Path> spillPaths = emptyList();\n List<Type> types = ImmutableList.of(BIGINT);\n FileSingleStreamSpillerFactory spill... | {
"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_260 | {
"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 testBucketedTemporalTableCompaction()\n {\n long day1 = 1;\n long day2 = 2;\n long day3 = 3;\n long day4 = 4;\n\n List<ShardIndexInfo> inputShards = ImmutableList.of(\n shardWithTemporalBucket(OptionalInt.of(1), DATE, day1, day1),\... | {
"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_1195 | {
"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 testAbort()\n {\n BroadcastOutputBuffer bufferedBuffer = createBroadcastBuffer(\n createInitialEmptyOutputBuffers(BROADCAST)\n .withBuffer(FIRST, BROADCAST_PARTITION_ID)\n .withBuffer(SECOND, BROADCAST_PARTITION_I... | {
"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": "@Override\n public void abort(OutputBufferId bufferId)\n {\n checkState(!Thread.holdsLock(this), \"Cannot abort while holding a lock on this\");\n requireNonNull(bufferId, \"bufferId is null\");\n\n getBuffer(bufferId).destroy();\n\n checkFlushComplete();\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_775 | {
"fields": [
{
"declarator": "TYPES = ImmutableList.of(VARCHAR)",
"modifier": "private static final",
"original_string": "private static final List<Type> TYPES = ImmutableList.of(VARCHAR);",
"type": "List<Type>",
"var_name": "TYPES"
},
{
"declarator": "SERDE_FACTORY = ... | {
"body": "@Test\n public void testFinish()\n throws Exception\n {\n SourceOperator operator = createExchangeOperator();\n\n operator.addSplit(newRemoteSplit(TASK_1_ID));\n operator.addSplit(newRemoteSplit(TASK_2_ID));\n operator.addSplit(newRemoteSplit(TASK_3_ID));\n ... | {
"fields": [
{
"declarator": "REMOTE_CONNECTOR_ID = new CatalogName(\"$remote\")",
"modifier": "public static final",
"original_string": "public static final CatalogName REMOTE_CONNECTOR_ID = new CatalogName(\"$remote\");",
"type": "CatalogName",
"var_name": "REMOTE_CONNECTOR_ID"
... | {
"body": "@Override\n public void finish()\n {\n close();\n }",
"class_method_signature": "ExchangeOperator.finish()",
"constructor": false,
"full_signature": "@Override public void finish()",
"identifier": "finish",
"invocations": [
"close"
],
"modifiers": "@Override public",
"pa... | {
"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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.