id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
166515022_683
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java", "identifier": "TestIntegerOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testMultiply()\n {\n assertFunction(\"INTEGER'37' * INTEGER'37'\", INTEGER, 37 * 37);\n assertFunction(\"INTEGER'37' * INTEGER'17'\", INTEGER, 37 * 17);\n assertFunction(\"INTEGER'17' * INTEGER'37'\", INTEGER, 17 * 37);\n assertFunction(\"INTEGER'17' * ...
{ "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(MULTIPLY)\n @SqlType(StandardTypes.INTEGER)\n public static long multiply(@SqlType(StandardTypes.INTEGER) long left, @SqlType(StandardTypes.INTEGER) long right)\n {\n try {\n return Math.multiplyExact((int) left, (int) right);\n }\n catch (Arithmetic...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_379
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTPolygon()\n {\n assertFunction(\"ST_AsText(ST_Polygon('POLYGON EMPTY'))\", VARCHAR, \"POLYGON EMPTY\");\n assertFunction(\"ST_AsText(ST_Polygon('POLYGON ((1 1, 1 4, 4 4, 4 1))'))\", VARCHAR, \"POLYGON ((1 1, 4 1, 4 4, 1 4, 1 1))\");\n assertInvalidFuncti...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns a Geometry type Polygon object from Well-Known Text representation (WKT)\")\n @ScalarFunction(\"ST_Polygon\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice stPolygon(@SqlType(VARCHAR) Slice input)\n {\n OGCGeometry geometry = geometryFromText(input);\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1063
{ "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 testLambda()\n {\n analyze(\"SELECT apply(5, x -> abs(x)) from t1\");\n assertFails(\"SELECT x -> abs(x) from t1\")\n .hasErrorCode(TYPE_MISMATCH);\n }", "class_method_signature": "TestAnalyzer.testLambda()", "constructor": false, "full_signat...
{ "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_945
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestRemoveRedundantExists.java", "identifier": "TestRemoveRedundantExists", "interfaces": "", "superclass": "extends BaseRuleTest" }
{ "body": "@Test\n public void testExistsFalse()\n {\n tester().assertThat(new RemoveRedundantExists())\n .on(p -> p.apply(Assignments.of(p.symbol(\"exists\"), new ExistsPredicate(TRUE_LITERAL)),\n ImmutableList.of(),\n p.values(1),\n ...
{ "fields": [ { "declarator": "PATTERN = applyNode()\n .matching(node -> node.getSubqueryAssignments()\n .getExpressions().stream()\n .allMatch(expression -> expression instanceof ExistsPredicate && ((ExistsPredicate) expression).getSubquery().equals(TRUE_LIT...
{ "body": "@Override\n public Result apply(ApplyNode node, Captures captures, Context context)\n {\n Assignments.Builder assignments = Assignments.builder();\n assignments.putIdentities(node.getInput().getOutputSymbols());\n\n Expression result;\n if (QueryCardinalityUtil.isEmpty(nod...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_416
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTNumGeometries()\n {\n assertSTNumGeometries(\"POINT EMPTY\", 0);\n assertSTNumGeometries(\"LINESTRING EMPTY\", 0);\n assertSTNumGeometries(\"POLYGON EMPTY\", 0);\n assertSTNumGeometries(\"MULTIPOINT EMPTY\", 0);\n assertSTNumGeometries(\"MU...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns the cardinality of the geometry collection\")\n @ScalarFunction(\"ST_NumGeometries\")\n @SqlType(INTEGER)\n public static long stNumGeometries(@SqlType(GEOMETRY_TYPE_NAME) Slice input)\n {\n OGCGeometry geometry = deserialize(input);\n if (geometry.isEmpty()...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_553
{ "fields": [ { "declarator": "metadata", "modifier": "private", "original_string": "private MemoryMetadata metadata;", "type": "MemoryMetadata", "var_name": "metadata" } ], "file": "presto-memory/src/test/java/io/prestosql/plugin/memory/TestMemoryMetadata.java", "identifie...
{ "body": "@Test\n public void testCreateSchema()\n {\n assertEquals(metadata.listSchemaNames(SESSION), ImmutableList.of(\"default\"));\n metadata.createSchema(SESSION, \"test\", ImmutableMap.of(), new PrestoPrincipal(USER, SESSION.getUser()));\n assertEquals(metadata.listSchemaNames(SESSIO...
{ "fields": [ { "declarator": "SCHEMA_NAME = \"default\"", "modifier": "public static final", "original_string": "public static final String SCHEMA_NAME = \"default\";", "type": "String", "var_name": "SCHEMA_NAME" }, { "declarator": "nodeManager", "modifier": "pri...
{ "body": "@Override\n public synchronized void createSchema(ConnectorSession session, String schemaName, Map<String, Object> properties, PrestoPrincipal owner)\n {\n if (schemas.contains(schemaName)) {\n throw new PrestoException(ALREADY_EXISTS, format(\"Schema [%s] already exists\", schemaNa...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_103
{ "fields": [ { "declarator": "DEFAULT_CLIENT = createFakeMetastoreClient()", "modifier": "private static final", "original_string": "private static final ThriftMetastoreClient DEFAULT_CLIENT = createFakeMetastoreClient();", "type": "ThriftMetastoreClient", "var_name": "DEFAULT_CLIEN...
{ "body": "@Test\n public void testDefaultHiveMetastore()\n throws TException\n {\n MetastoreLocator locator = createMetastoreLocator(CONFIG_WITH_FALLBACK, ImmutableMap.of(DEFAULT_URI, Optional.of(DEFAULT_CLIENT)));\n assertEqualHiveClient(locator.createMetastoreClient(Optional.empty())...
{ "fields": [ { "declarator": "addresses", "modifier": "private final", "original_string": "private final List<HostAndPort> addresses;", "type": "List<HostAndPort>", "var_name": "addresses" }, { "declarator": "backoffs", "modifier": "private final", "origina...
{ "body": "@Override\n public ThriftMetastoreClient createMetastoreClient(Optional<String> delegationToken)\n throws TException\n {\n List<Integer> indices = backoffs.stream()\n .sorted(Comparator.comparingLong(Backoff::getBackoffDuration))\n .map(backoffs::indexO...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1219
{ "fields": [ { "declarator": "OUT = new OutputBufferId(0)", "modifier": "public static final", "original_string": "public static final OutputBufferId OUT = new OutputBufferId(0);", "type": "OutputBufferId", "var_name": "OUT" }, { "declarator": "CONNECTOR_ID = TEST_TABL...
{ "body": "@Test\n public void testScheduleSplitsOneAtATime()\n {\n StageExecutionPlan plan = createPlan(createFixedSplitSource(60, TestingSplit::createRemoteSplit));\n NodeTaskMap nodeTaskMap = new NodeTaskMap(finalizerService);\n SqlStageExecution stage = createSqlStageExecution(plan, nod...
{ "fields": [ { "declarator": "stage", "modifier": "private final", "original_string": "private final SqlStageExecution stage;", "type": "SqlStageExecution", "var_name": "stage" }, { "declarator": "splitSource", "modifier": "private final", "original_string"...
{ "body": "@Override\n public synchronized ScheduleResult schedule()\n {\n dropListenersFromWhenFinishedOrNewLifespansAdded();\n\n int overallSplitAssignmentCount = 0;\n ImmutableSet.Builder<RemoteTask> overallNewTasks = ImmutableSet.builder();\n List<ListenableFuture<?>> overallBloc...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_75
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildGlueExpressionTupleDomainAll()\n {\n String expression = buildGlueExpression(ImmutableList.of(\"col1\"), TupleDomain.all(), true);\n assertEquals(expression, \"\");\n }", "class_method_signature": "TestGlueExpressionUtil.testBuildGlueExpressionTupleDoma...
{ "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_800
{ "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 testSha1()\n {\n assertFunction(\"sha1(CAST('' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"DA39A3EE5E6B4B0D3255BFEF95601890AFD80709\"));\n assertFunction(\"sha1(CAST('hashme' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"FB78992E561929A6967D5328F49413FA99...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/VarbinaryFunctions.java", "identifier": "VarbinaryFunctions", "interfaces": "", "methods": [ { "class_method_signature": "VarbinaryFunctions.VarbinaryFunctions()", "constructor": true, "full_signature": "priv...
{ "body": "@Description(\"Compute sha1 hash\")\n @ScalarFunction\n @SqlType(StandardTypes.VARBINARY)\n public static Slice sha1(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n return computeHash(Hashing.sha1(), slice);\n }", "class_method_signature": "VarbinaryFunctions.sha1(@SqlType(Stan...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_380
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTArea()\n {\n assertArea(\"POLYGON ((2 2, 2 6, 6 6, 6 2))\", 16.0);\n assertArea(\"POLYGON EMPTY\", 0.0);\n assertArea(\"LINESTRING (1 4, 2 5)\", 0.0);\n assertArea(\"LINESTRING EMPTY\", 0.0);\n assertArea(\"POINT (1 4)\", 0.0);\n ass...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns the 2D Euclidean area of a geometry\")\n @ScalarFunction(\"ST_Area\")\n @SqlType(DOUBLE)\n public static double stArea(@SqlType(GEOMETRY_TYPE_NAME) Slice input)\n {\n OGCGeometry geometry = deserialize(input);\n\n // The Esri geometry library does not suppor...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1130
{ "fields": [ { "declarator": "embedVersion", "modifier": "private", "original_string": "private EmbedVersion embedVersion;", "type": "EmbedVersion", "var_name": "embedVersion" } ], "file": "presto-main/src/test/java/io/prestosql/version/TestEmbedVersion.java", "identifier"...
{ "body": "@Test\n public void testEmbedVersionInRunnable()\n {\n AtomicInteger counter = new AtomicInteger();\n embedVersion.embedVersion((Runnable) counter::incrementAndGet).run();\n assertEquals(counter.get(), 1);\n\n assertThatThrownBy(() ->\n embedVersion.embedVer...
{ "fields": [ { "declarator": "runnableConstructor", "modifier": "private final", "original_string": "private final MethodHandle runnableConstructor;", "type": "MethodHandle", "var_name": "runnableConstructor" }, { "declarator": "callableConstructor", "modifier": ...
{ "body": "@Inject\n public EmbedVersion(NodeVersion version)\n {\n this(version.getVersion());\n }", "class_method_signature": "EmbedVersion.EmbedVersion(NodeVersion version)", "constructor": true, "full_signature": "@Inject public EmbedVersion(NodeVersion version)", "identifier": "EmbedVers...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1075
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/split/TestBufferingSplitSource.java", "identifier": "TestBufferingSplitSource", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFailImmediate()\n {\n MockSplitSource mockSource = new MockSplitSource()\n .setBatchSize(1)\n .atSplitCompletion(FAIL);\n try (SplitSource source = new BufferingSplitSource(mockSource, 100)) {\n assertFutureFailsWithMockFa...
{ "fields": [ { "declarator": "bufferSize", "modifier": "private final", "original_string": "private final int bufferSize;", "type": "int", "var_name": "bufferSize" }, { "declarator": "source", "modifier": "private final", "original_string": "private final S...
{ "body": "@Override\n public ListenableFuture<SplitBatch> getNextBatch(ConnectorPartitionHandle partitionHandle, Lifespan lifespan, int maxSize)\n {\n checkArgument(maxSize > 0, \"Cannot fetch a batch of zero size\");\n return GetNextBatch.fetchNextBatchAsync(source, Math.min(bufferSize, maxSize)...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_695
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestRealOperators.java", "identifier": "TestRealOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSubtract()\n {\n assertFunction(\"REAL'12.34' - REAL'56.78'\", REAL, 12.34f - 56.78f);\n assertFunction(\"REAL'-17.34' - REAL'-22.891'\", REAL, -17.34f - -22.891f);\n assertFunction(\"REAL'-89.123' - REAL'754.0'\", REAL, -89.123f - 754.0f);\n assert...
{ "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(SUBTRACT)\n @SqlType(StandardTypes.REAL)\n public static long subtract(@SqlType(StandardTypes.REAL) long left, @SqlType(StandardTypes.REAL) long right)\n {\n return floatToRawIntBits(intBitsToFloat((int) left) - intBitsToFloat((int) right));\n }", "class_method_signatur...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_9
{ "fields": [ { "declarator": "config", "modifier": "private", "original_string": "private DbSessionPropertyManagerConfig config;", "type": "DbSessionPropertyManagerConfig", "var_name": "config" }, { "declarator": "dao", "modifier": "private", "original_stri...
{ "body": "@Test\n public void testSessionProperties()\n {\n dao.insertSpecRow(1, \"foo.*\", null, null, null, 0);\n dao.insertSessionProperty(1, \"prop_1\", \"val_1\");\n\n dao.insertSpecRow(2, \".*\", \"bar.*\", null, null, 0);\n dao.insertSessionProperty(2, \"prop_2\", \"val_2\");...
{ "fields": [ { "declarator": "specsProvider", "modifier": "private final", "original_string": "private final DbSpecsProvider specsProvider;", "type": "DbSpecsProvider", "var_name": "specsProvider" } ], "file": "presto-session-property-managers/src/main/java/io/prestosql/plug...
{ "body": "@Override\n public Map<String, String> getSystemSessionProperties(SessionConfigurationContext context)\n {\n List<SessionMatchSpec> sessionMatchSpecs = specsProvider.get();\n\n // later properties override earlier properties\n Map<String, String> combinedProperties = new HashMap<...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_441
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/type/TestDecimals.java", "identifier": "TestDecimals", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEncodeShortScaledValue()\n {\n assertEquals(encodeShortScaledValue(new BigDecimal(\"2.00\"), 2), 200L);\n assertEquals(encodeShortScaledValue(new BigDecimal(\"2.13\"), 2), 213L);\n assertEquals(encodeShortScaledValue(new BigDecimal(\"172.60\"), 2), 17260L)...
{ "fields": [ { "declarator": "MAX_PRECISION = 38", "modifier": "public static final", "original_string": "public static final int MAX_PRECISION = 38;", "type": "int", "var_name": "MAX_PRECISION" }, { "declarator": "MAX_SHORT_PRECISION = 18", "modifier": "public s...
{ "body": "public static long encodeShortScaledValue(BigDecimal value, int scale)\n {\n return encodeShortScaledValue(value, scale, UNNECESSARY);\n }", "class_method_signature": "Decimals.encodeShortScaledValue(BigDecimal value, int scale)", "constructor": false, "full_signature": "public static lo...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_912
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/optimizations/TestLocalProperties.java", "identifier": "TestLocalProperties", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testConstantWithSort()\n {\n List<LocalProperty<String>> actual = builder()\n .constant(\"b\")\n .sorted(\"a\", SortOrder.ASC_NULLS_FIRST)\n .sorted(\"b\", SortOrder.ASC_NULLS_FIRST)\n .sorted(\"c\", SortOrder.ASC_...
{ "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_22
{ "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 testSchemaRulesForCheckCanShowCreateSchema()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-schema.json\");\n\n accessControl.checkCanShowCreateSchema(ADMIN, new CatalogSchemaName(\"some-catalog\", \"bob\"));\n ...
{ "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 checkCanShowCreateSchema(SystemSecurityContext context, CatalogSchemaName schemaName)\n {\n if (!isSchemaOwner(context, schemaName)) {\n denyShowCreateSchema(schemaName.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_857
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testConcat()\n {\n assertInvalidFunction(\"CONCAT('')\", \"There must be two or more concatenation arguments\");\n assertFunction(\"CONCAT('hello', ' world')\", VARCHAR, \"hello world\");\n assertFunction(\"CONCAT('', '')\", VARCHAR, \"\");\n assertFunc...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java", "identifier": "StringFunctions", "interfaces": "", "methods": [ { "class_method_signature": "StringFunctions.StringFunctions()", "constructor": true, "full_signature": "private StringF...
{ "body": "@Description(\"Concatenates given character strings\")\n @ScalarFunction\n @LiteralParameters({\"x\", \"y\", \"u\"})\n @Constraint(variable = \"u\", expression = \"x + y\")\n @SqlType(\"char(u)\")\n public static Slice concat(@LiteralParameter(\"x\") Long x, @SqlType(\"char(x)\") Slice left,...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_154
{ "fields": [ { "declarator": "tempRoot", "modifier": "private", "original_string": "private File tempRoot;", "type": "File", "var_name": "tempRoot" }, { "declarator": "tempFile", "modifier": "private", "original_string": "private Path tempFile;", "typ...
{ "body": "@Test(dataProvider = \"validFileSizeAndPaddedFileSize\")\n public void testReadTailForFileSize(int fileSize, int paddedFileSize)\n throws Exception\n {\n // Cleanup between each input run\n fs.truncate(tempFile, 0);\n\n if (fileSize > 0) {\n try (FSDataOutpu...
{ "fields": [ { "declarator": "MAX_SUPPORTED_PADDING_BYTES = 64", "modifier": "public static final", "original_string": "public static final int MAX_SUPPORTED_PADDING_BYTES = 64;", "type": "int", "var_name": "MAX_SUPPORTED_PADDING_BYTES" }, { "declarator": "MAXIMUM_READ...
{ "body": "public static long readTailForFileSize(String path, long paddedFileSize, FSDataInputStream inputStream)\n throws IOException\n {\n long position = max(paddedFileSize - MAX_SUPPORTED_PADDING_BYTES, 0);\n long maxEOFAt = paddedFileSize + 1;\n long startPos = inputStream.get...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_504
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/resourcegroups/TestResourceGroupId.java", "identifier": "TestResourceGroupId", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsAncestor()\n {\n ResourceGroupId root = new ResourceGroupId(\"root\");\n ResourceGroupId rootA = new ResourceGroupId(root, \"a\");\n ResourceGroupId rootAFoo = new ResourceGroupId(rootA, \"foo\");\n ResourceGroupId rootBar = new ResourceGroupId(ro...
{ "fields": [ { "declarator": "segments", "modifier": "private final", "original_string": "private final List<String> segments;", "type": "List<String>", "var_name": "segments" } ], "file": "presto-spi/src/main/java/io/prestosql/spi/resourcegroups/ResourceGroupId.java", "id...
{ "body": "public boolean isAncestorOf(ResourceGroupId descendant)\n {\n List<String> descendantSegments = descendant.getSegments();\n if (segments.size() >= descendantSegments.size()) {\n return false;\n }\n return descendantSegments.subList(0, segments.size()).equals(segmen...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1167
{ "fields": [ { "declarator": "CATALOG_NAME = \"catalog\"", "modifier": "private static final", "original_string": "private static final String CATALOG_NAME = \"catalog\";", "type": "String", "var_name": "CATALOG_NAME" }, { "declarator": "PARENT_TABLE = new ConnectorTab...
{ "body": "@Test\n public void testCreateLikeWithProperties()\n {\n CreateTable statement = getCreatleLikeStatement(true);\n\n getFutureValue(new CreateTableTask().internalExecute(statement, metadata, new AllowAllAccessControl(), testSession, List.of()));\n assertEquals(metadata.getCreateTa...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/CreateTableTask.java", "identifier": "CreateTableTask", "interfaces": "implements DataDefinitionTask<CreateTable>", "methods": [ { "class_method_signature": "CreateTableTask.getName()", "constructor": false, "full_...
{ "body": "@VisibleForTesting\n ListenableFuture<?> internalExecute(CreateTable statement, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters)\n {\n checkArgument(!statement.getElements().isEmpty(), \"no columns for table\");\n\n Map<NodeRef<Parameter>, Ex...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_787
{ "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 testLength()\n {\n assertFunction(\"length(CAST('' AS VARBINARY))\", BIGINT, 0L);\n assertFunction(\"length(CAST('a' AS VARBINARY))\", BIGINT, 1L);\n assertFunction(\"length(CAST('abc' AS VARBINARY))\", BIGINT, 3L);\n }", "class_method_signature": "TestVa...
{ "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(\"Length of the given binary\")\n @ScalarFunction\n @SqlType(StandardTypes.BIGINT)\n public static long length(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n return slice.length();\n }", "class_method_signature": "VarbinaryFunctions.length(@SqlType(StandardTypes.V...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_292
{ "fields": [], "file": "presto-thrift-api/src/test/java/io/prestosql/plugin/thrift/api/valuesets/TestPrestoThriftAllOrNoneValueSet.java", "identifier": "TestPrestoThriftAllOrNoneValueSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFromValueSetNone()\n {\n PrestoThriftValueSet thriftValueSet = fromValueSet(ValueSet.none(HYPER_LOG_LOG));\n assertNotNull(thriftValueSet.getAllOrNoneValueSet());\n assertFalse(thriftValueSet.getAllOrNoneValueSet().isAll());\n }", "class_method_signat...
{ "fields": [ { "declarator": "all", "modifier": "private final", "original_string": "private final boolean all;", "type": "boolean", "var_name": "all" } ], "file": "presto-thrift-api/src/main/java/io/prestosql/plugin/thrift/api/valuesets/PrestoThriftAllOrNoneValueSet.java", ...
{ "body": "@ThriftField(1)\n public boolean isAll()\n {\n return all;\n }", "class_method_signature": "PrestoThriftAllOrNoneValueSet.isAll()", "constructor": false, "full_signature": "@ThriftField(1) public boolean isAll()", "identifier": "isAll", "invocations": [], "modifiers": "@ThriftFi...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_768
{ "fields": [ { "declarator": "executor = newSingleThreadScheduledExecutor(daemonThreadsNamed(getClass().getSimpleName() + \"-%s\"))", "modifier": "private final", "original_string": "private final ScheduledExecutorService executor = newSingleThreadScheduledExecutor(daemonThreadsNamed(getClass()...
{ "body": "@Test\n public void testProjectLazyLoad()\n {\n PageProcessor pageProcessor = new PageProcessor(Optional.of(new SelectAllFilter()), ImmutableList.of(new LazyPagePageProjection()), OptionalInt.of(MAX_BATCH_SIZE));\n\n // if channel 1 is loaded, test will fail\n Page inputPage = ne...
{ "fields": [ { "declarator": "MAX_BATCH_SIZE = 8 * 1024", "modifier": "public static final", "original_string": "public static final int MAX_BATCH_SIZE = 8 * 1024;", "type": "int", "var_name": "MAX_BATCH_SIZE" }, { "declarator": "MAX_PAGE_SIZE_IN_BYTES = 4 * 1024 * 102...
{ "body": "public Iterator<Optional<Page>> process(ConnectorSession session, DriverYieldSignal yieldSignal, LocalMemoryContext memoryContext, Page page)\n {\n return process(session, yieldSignal, memoryContext, page, false);\n }", "class_method_signature": "PageProcessor.process(ConnectorSession 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_338
{ "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 testGetUrl()\n throws Exception\n {\n DatabaseMetaData metaData = connection.getMetaData();\n assertEquals(metaData.getURL(), \"jdbc:presto://\" + server.getAddress());\n }", "class_method_signature": "TestPrestoDatabaseMetaData.testGetUrl()", "cons...
{ "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 String getURL()\n throws SQLException\n {\n return \"jdbc:\" + connection.getURI().toString();\n }", "class_method_signature": "PrestoDatabaseMetaData.getURL()", "constructor": false, "full_signature": "@Override public String getURL()", "identifier": "...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1188
{ "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 testDestroy()\n {\n ClientBuffer buffer = new ClientBuffer(TASK_INSTANCE_ID, BUFFER_ID);\n\n // add 5 pages the buffer\n for (int i = 0; i < 5; i++) {\n addPage(buffer, createPage(i));\n }\n buffer.setNoMorePages();\n\n // read ...
{ "fields": [ { "declarator": "taskInstanceId", "modifier": "private final", "original_string": "private final String taskInstanceId;", "type": "String", "var_name": "taskInstanceId" }, { "declarator": "bufferId", "modifier": "private final", "original_strin...
{ "body": "public void destroy()\n {\n List<SerializedPageReference> removedPages;\n PendingRead pendingRead;\n synchronized (this) {\n removedPages = ImmutableList.copyOf(pages);\n pages.clear();\n\n bufferedBytes.getAndSet(0);\n\n noMorePages = tru...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1022
{ "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 testOrderByExpressionOnOutputColumn2()\n {\n // TODO: validate output\n analyze(\"SELECT a x FROM t1 ORDER BY a + 1\");\n\n assertFails(\"SELECT x.c as x\\n\" +\n \"FROM (VALUES 1) x(c)\\n\" +\n \"ORDER BY x.c\")\n ...
{ "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_1055
{ "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 testExistingRecursiveView()\n {\n analyze(\"SELECT * FROM v1 a JOIN v1 b ON a.a = b.a\");\n analyze(\"SELECT * FROM v1 a JOIN (SELECT * from v1) b ON a.a = b.a\");\n assertFails(\"SELECT * FROM v5\")\n .hasErrorCode(INVALID_VIEW);\n }", "cl...
{ "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_1110
{ "fields": [ { "declarator": "testFile", "modifier": "private", "original_string": "private File testFile;", "type": "File", "var_name": "testFile" } ], "file": "presto-main/src/test/java/io/prestosql/server/security/TestUserMapping.java", "identifier": "TestUserMapping", ...
{ "body": "@Test\n public void testSimplePatternRule()\n throws Exception\n {\n UserMapping userMapping = new UserMapping(ImmutableList.of(new Rule(\"(.*?)@.*\")));\n assertEquals(userMapping.mapUser(\"test@example.com\"), \"test\");\n assertThrows(UserMappingException.class, () ...
{ "fields": [ { "declarator": "rules", "modifier": "private final", "original_string": "private final List<Rule> rules;", "type": "List<Rule>", "var_name": "rules" } ], "file": "presto-main/src/main/java/io/prestosql/server/security/UserMapping.java", "identifier": "UserMap...
{ "body": "public String mapUser(String principal)\n throws UserMappingException\n {\n for (Rule rule : rules) {\n Optional<String> user = rule.mapUser(principal);\n if (user.isPresent()) {\n return user.get();\n }\n }\n\n throw new Us...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_573
{ "fields": [ { "declarator": "IDENTITY = JdbcIdentity.from(SESSION)", "modifier": "private static final", "original_string": "private static final JdbcIdentity IDENTITY = JdbcIdentity.from(SESSION);", "type": "JdbcIdentity", "var_name": "IDENTITY" } ], "file": "presto-base-j...
{ "body": "@Test\n public void testNullPointerException()\n {\n MockConnectorFactory mock = new MockConnectorFactory(THROW_NPE);\n ConnectionFactory factory = new RetryingConnectionFactory(mock);\n assertThatThrownBy(() -> factory.openConnection(IDENTITY))\n .isInstanceOf(Nul...
{ "fields": [ { "declarator": "RETRY_POLICY = new RetryPolicy<>()\n .withMaxDuration(java.time.Duration.of(30, SECONDS))\n .withMaxAttempts(5)\n .withBackoff(50, 5_000, MILLIS, 4)\n .handleIf(RetryingConnectionFactory::isSqlRecoverableException)\n .abor...
{ "body": "@Override\n public Connection openConnection(JdbcIdentity identity)\n throws SQLException\n {\n try {\n return Failsafe.with(RETRY_POLICY)\n .get(() -> delegate.openConnection(identity));\n }\n catch (FailsafeException ex) {\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_123
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/s3/TestHiveS3TypeConfig.java", "identifier": "TestHiveS3TypeConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"hive.s3-file-system-type\", \"EMRFS\")\n .build();\n\n HiveS3TypeConfig expected = new HiveS3TypeConfig()\n ...
{ "fields": [ { "declarator": "s3FileSystemType = S3FileSystemType.PRESTO", "modifier": "private", "original_string": "private S3FileSystemType s3FileSystemType = S3FileSystemType.PRESTO;", "type": "S3FileSystemType", "var_name": "s3FileSystemType" } ], "file": "presto-hive/s...
{ "body": "@Config(\"hive.s3-file-system-type\")\n public HiveS3TypeConfig setS3FileSystemType(S3FileSystemType s3FileSystemType)\n {\n this.s3FileSystemType = s3FileSystemType;\n return this;\n }", "class_method_signature": "HiveS3TypeConfig.setS3FileSystemType(S3FileSystemType s3FileSystemT...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1239
{ "fields": [], "file": "presto-pinot/src/test/java/io/prestosql/pinot/query/TestDynamicTable.java", "identifier": "TestDynamicTable", "interfaces": "", "superclass": "extends TestPinotQueryBase" }
{ "body": "@Test\n public void testRealtimeOnlyDynamicTable()\n {\n String tableName = hybridTable.getTableName();\n String tableNameWithSuffix = tableName + REALTIME_SUFFIX;\n String query = format(\"select * from %s limit 70\", tableNameWithSuffix);\n DynamicTable dynamicTable = bu...
{ "fields": [ { "declarator": "tableName", "modifier": "private final", "original_string": "private final String tableName;", "type": "String", "var_name": "tableName" }, { "declarator": "suffix", "modifier": "private final", "original_string": "private fina...
{ "body": "@JsonProperty\n public String getTableName()\n {\n return tableName;\n }", "class_method_signature": "DynamicTable.getTableName()", "constructor": false, "full_signature": "@JsonProperty public String getTableName()", "identifier": "getTableName", "invocations": [], "modifiers":...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_55
{ "fields": [ { "declarator": "tester = new JsonFieldDecoderTester()", "modifier": "private", "original_string": "private JsonFieldDecoderTester tester = new JsonFieldDecoderTester();", "type": "JsonFieldDecoderTester", "var_name": "tester" } ], "file": "presto-record-decoder...
{ "body": "@Test\n public void testDecode()\n {\n // test decoding using default field decoder\n tester.assertDecodedAs(\"0.5\", DOUBLE, 0.5);\n tester.assertDecodedAs(\"-0.5\", DOUBLE, -0.5);\n tester.assertDecodedAs(\"10\", DOUBLE, 10.0);\n tester.assertDecodedAs(\"0\", DOUB...
{ "fields": [ { "declarator": "columnHandle", "modifier": "private final", "original_string": "private final DecoderColumnHandle columnHandle;", "type": "DecoderColumnHandle", "var_name": "columnHandle" }, { "declarator": "minValue", "modifier": "private final", ...
{ "body": "@Override\n public FieldValueProvider decode(JsonNode value)\n {\n return new JsonValueProvider(value, columnHandle, minValue, maxValue);\n }", "class_method_signature": "DefaultJsonFieldDecoder.decode(JsonNode value)", "constructor": false, "full_signature": "@Override public FieldVa...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_820
{ "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 testLn()\n {\n for (double doubleValue : DOUBLE_VALUES) {\n assertFunction(\"ln(\" + doubleValue + \")\", DOUBLE, Math.log(doubleValue));\n }\n assertFunction(\"ln(NULL)\", DOUBLE, null);\n }", "class_method_signature": "TestMathFunctions.testL...
{ "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(\"Natural logarithm\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double ln(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Math.log(num);\n }", "class_method_signature": "MathFunctions.ln(@SqlType(StandardTypes.DOUBLE) double num)", "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_965
{ "fields": [ { "declarator": "idAllocator = new PlanNodeIdAllocator()", "modifier": "private final", "original_string": "private final PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator();", "type": "PlanNodeIdAllocator", "var_name": "idAllocator" } ], "file": "presto...
{ "body": "@Test\n public void testDoNotReorderCrossJoins()\n {\n PlanNode plan =\n joinNode(\n joinNode(\n values(\"a\"),\n values(\"b\")),\n values(\"c\"),\n ...
{ "fields": [ { "declarator": "PATTERN = join()", "modifier": "private static final", "original_string": "private static final Pattern<JoinNode> PATTERN = join();", "type": "Pattern<JoinNode>", "var_name": "PATTERN" }, { "declarator": "metadata", "modifier": "priv...
{ "body": "public static List<Integer> getJoinOrder(JoinGraph graph)\n {\n ImmutableList.Builder<PlanNode> joinOrder = ImmutableList.builder();\n\n Map<PlanNodeId, Integer> priorities = new HashMap<>();\n for (int i = 0; i < graph.size(); i++) {\n priorities.put(graph.getNode(i).get...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_436
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/type/TestSqlDecimal.java", "identifier": "TestSqlDecimal", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testToString()\n {\n assertEquals(new SqlDecimal(new BigInteger(\"0\"), 2, 1).toString(), \"0.0\");\n assertEquals(new SqlDecimal(new BigInteger(\"0\"), 3, 2).toString(), \"0.00\");\n assertEquals(new SqlDecimal(new BigInteger(\"0\"), 6, 5).toString(), \"0.000...
{ "fields": [ { "declarator": "unscaledValue", "modifier": "private final", "original_string": "private final BigInteger unscaledValue;", "type": "BigInteger", "var_name": "unscaledValue" }, { "declarator": "precision", "modifier": "private final", "original...
{ "body": "@JsonValue\n @Override\n public String toString()\n {\n return Decimals.toString(unscaledValue, scale);\n }", "class_method_signature": "SqlDecimal.toString()", "constructor": false, "full_signature": "@JsonValue @Override public String toString()", "identifier": "toString", "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_748
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private static final", "original_string": "private static final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" }, { "declarator": "LONG_AV...
{ "body": "@Test(dataProvider = \"dataType\")\n public void testMemoryReservationYield(Type type)\n {\n List<Page> input = createPagesWithDistinctHashKeys(type, 6_000, 600);\n OperatorFactory operatorFactory = new HashAggregationOperatorFactory(\n 0,\n new PlanNodeId(...
{ "fields": [ { "declarator": "MERGE_WITH_MEMORY_RATIO = 0.9", "modifier": "private static final", "original_string": "private static final double MERGE_WITH_MEMORY_RATIO = 0.9;", "type": "double", "var_name": "MERGE_WITH_MEMORY_RATIO" }, { "declarator": "operatorContex...
{ "body": "@Override\n public Page getOutput()\n {\n if (finished) {\n return null;\n }\n\n // process unfinished work if one exists\n if (unfinishedWork != null) {\n boolean workDone = unfinishedWork.process();\n aggregationBuilder.updateMemory();\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_318
{ "fields": [ { "declarator": "NUMBERS_TABLE_HANDLE = new ExampleTableHandle(\"example\", \"numbers\")", "modifier": "private static final", "original_string": "private static final ExampleTableHandle NUMBERS_TABLE_HANDLE = new ExampleTableHandle(\"example\", \"numbers\");", "type": "Examp...
{ "body": "@Test\n public void testListSchemaNames()\n {\n assertEquals(metadata.listSchemaNames(SESSION), ImmutableSet.of(\"example\", \"tpch\"));\n }", "class_method_signature": "TestExampleMetadata.testListSchemaNames()", "constructor": false, "full_signature": "@Test public void testListSche...
{ "fields": [ { "declarator": "exampleClient", "modifier": "private final", "original_string": "private final ExampleClient exampleClient;", "type": "ExampleClient", "var_name": "exampleClient" } ], "file": "presto-example-http/src/main/java/io/prestosql/plugin/example/Exampl...
{ "body": "@Override\n public List<String> listSchemaNames(ConnectorSession session)\n {\n return listSchemaNames();\n }", "class_method_signature": "ExampleMetadata.listSchemaNames(ConnectorSession session)", "constructor": false, "full_signature": "@Override public List<String> listSchemaNames...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1002
{ "fields": [ { "declarator": "metadata = MetadataManager.createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = MetadataManager.createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" } ], "file": "p...
{ "body": "@Test\n public void testDate()\n {\n List<RowExpression> values = new ArrayList<>();\n values.add(constant(1L, DATE));\n values.add(constant(2L, DATE));\n values.add(constant(3L, DATE));\n assertEquals(checkSwitchGenerationCase(DATE, values), DIRECT_SWITCH);\n\n ...
{ "fields": [ { "declarator": "valueExpression", "modifier": "private final", "original_string": "private final RowExpression valueExpression;", "type": "RowExpression", "var_name": "valueExpression" }, { "declarator": "testExpressions", "modifier": "private final...
{ "body": "@VisibleForTesting\n static SwitchGenerationCase checkSwitchGenerationCase(Type type, List<RowExpression> values)\n {\n if (values.size() > 32) {\n // 32 is chosen because\n // * SET_CONTAINS performs worst when smaller than but close to power of 2\n // * Bench...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1147
{ "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 testCommit()\n {\n TransactionManager transactionManager = createTestTransactionManager();\n\n Session session = sessionBuilder()\n .setTransactionId(transactionManager.beginTransaction(false))\n .build();\n QueryStateMachine stat...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/CommitTask.java", "identifier": "CommitTask", "interfaces": "implements DataDefinitionTask<Commit>", "methods": [ { "class_method_signature": "CommitTask.getName()", "constructor": false, "full_signature": "@Overri...
{ "body": "@Override\n public ListenableFuture<?> execute(Commit statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)\n {\n Session session = stateMachine.getSession();\n if (session.getTransa...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_877
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testUpper()\n {\n assertFunction(\"UPPER('')\", createVarcharType(0), \"\");\n assertFunction(\"UPPER('Hello World')\", createVarcharType(11), \"HELLO WORLD\");\n assertFunction(\"UPPER('what!!')\", createVarcharType(6), \"WHAT!!\");\n assertFunction(\"...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java", "identifier": "StringFunctions", "interfaces": "", "methods": [ { "class_method_signature": "StringFunctions.StringFunctions()", "constructor": true, "full_signature": "private StringF...
{ "body": "@Description(\"Converts the string to upper case\")\n @ScalarFunction\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice upper(@SqlType(\"varchar(x)\") Slice slice)\n {\n return toUpperCase(slice);\n }", "class_method_signature": "StringFunctions.upper(@...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_174
{ "fields": [ { "declarator": "inputFormat", "modifier": "private", "original_string": "private TextInputFormat inputFormat;", "type": "TextInputFormat", "var_name": "inputFormat" } ], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/s3select/TestS3SelectPushdown.j...
{ "body": "@Test\n public void testIsCompressionCodecSupported()\n {\n assertTrue(S3SelectPushdown.isCompressionCodecSupported(inputFormat, new Path(\"s3://fakeBucket/fakeObject.gz\")));\n assertFalse(S3SelectPushdown.isCompressionCodecSupported(inputFormat, new Path(\"s3://fakeBucket/fakeObject\"...
{ "fields": [ { "declarator": "SUPPORTED_S3_PREFIXES = ImmutableSet.of(\"s3://\", \"s3a://\", \"s3n://\")", "modifier": "private static final", "original_string": "private static final Set<String> SUPPORTED_S3_PREFIXES = ImmutableSet.of(\"s3://\", \"s3a://\", \"s3n://\");", "type": "Set<St...
{ "body": "public static boolean isCompressionCodecSupported(InputFormat<?, ?> inputFormat, Path path)\n {\n if (inputFormat instanceof TextInputFormat) {\n return getCompressionCodec((TextInputFormat) inputFormat, path)\n .map(codec -> (codec instanceof GzipCodec) || (codec in...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_524
{ "fields": [], "file": "presto-cli/src/test/java/io/prestosql/cli/TestCsvPrinter.java", "identifier": "TestCsvPrinter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCsvPrintingNoRowsWithoutQuotes()\n throws Exception\n {\n StringWriter writer = new StringWriter();\n List<String> fieldNames = ImmutableList.of(\"first\", \"last\");\n OutputPrinter printer = new CsvPrinter(fieldNames, writer, NO_QUOTES);\n\n ...
{ "fields": [ { "declarator": "fieldNames", "modifier": "private final", "original_string": "private final List<String> fieldNames;", "type": "List<String>", "var_name": "fieldNames" }, { "declarator": "writer", "modifier": "private final", "original_string"...
{ "body": "@Override\n public void finish()\n throws IOException\n {\n printRows(ImmutableList.of(), true);\n writer.flush();\n checkError();\n }", "class_method_signature": "CsvPrinter.finish()", "constructor": false, "full_signature": "@Override public void 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_461
{ "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 testShiftLeft()\n {\n assertEquals(shiftLeft(wrappedLongArray(0x1234567890ABCDEFL, 0xEFDCBA0987654321L), 0), wrappedLongArray(0x1234567890ABCDEFL, 0xEFDCBA0987654321L));\n assertEquals(shiftLeft(wrappedLongArray(0x1234567890ABCDEFL, 0xEFDCBA0987654321L), 1), wrappedL...
{ "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": "static Slice shiftLeft(Slice decimal, int leftShifts)\n {\n Slice result = Slices.copyOf(decimal);\n shiftLeftDestructive(result, leftShifts);\n return result;\n }", "class_method_signature": "UnscaledDecimal128Arithmetic.shiftLeft(Slice decimal, int leftShifts)", "constructo...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_932
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/TestLogicalPlanner.java", "identifier": "TestLogicalPlanner", "interfaces": "", "superclass": "extends BasePlanTest" }
{ "body": "@Test\n public void testRedundantDistinctLimitNodeRemoval()\n {\n String query = \"SELECT distinct(c) FROM (SELECT count(*) as c FROM orders) LIMIT 10\";\n assertFalse(\n searchFrom(plan(query, OPTIMIZED).getRoot())\n .where(isInstanceOfAny(Distinct...
{ "fields": [ { "declarator": "idAllocator", "modifier": "private final", "original_string": "private final PlanNodeIdAllocator idAllocator;", "type": "PlanNodeIdAllocator", "var_name": "idAllocator" }, { "declarator": "session", "modifier": "private final", ...
{ "body": "public Plan plan(Analysis analysis)\n {\n return plan(analysis, OPTIMIZED_AND_VALIDATED);\n }", "class_method_signature": "LogicalPlanner.plan(Analysis analysis)", "constructor": false, "full_signature": "public Plan plan(Analysis analysis)", "identifier": "plan", "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_898
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/optimizations/TestLocalProperties.java", "identifier": "TestLocalProperties", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTranslate()\n {\n Map<String, String> map = ImmutableMap.of();\n List<LocalProperty<String>> input = ImmutableList.of();\n assertEquals(LocalProperties.translate(input, translateWithMap(map)), ImmutableList.of());\n\n map = ImmutableMap.of();\n ...
{ "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 <X, Y> List<LocalProperty<Y>> translate(List<? extends LocalProperty<X>> properties, Function<X, Optional<Y>> translator)\n {\n properties = normalizeAndPrune(properties);\n\n ImmutableList.Builder<LocalProperty<Y>> builder = ImmutableList.builder();\n for (LocalProper...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1281
{ "fields": [], "file": "presto-kinesis/src/test/java/io/prestosql/plugin/kinesis/TestKinesisPlugin.java", "identifier": "TestKinesisPlugin", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public ConnectorFactory testConnectorExists()\n {\n KinesisPlugin plugin = new KinesisPlugin();\n\n // Create factory manually to double check everything is done right\n Iterable<ConnectorFactory> iteratable = plugin.getConnectorFactories();\n\n List<ConnectorFacto...
{ "fields": [ { "declarator": "factory", "modifier": "private", "original_string": "private KinesisConnectorFactory factory;", "type": "KinesisConnectorFactory", "var_name": "factory" } ], "file": "presto-kinesis/src/main/java/io/prestosql/plugin/kinesis/KinesisPlugin.java", ...
{ "body": "@Override\n public synchronized Iterable<ConnectorFactory> getConnectorFactories()\n {\n if (factory == null) {\n this.factory = new KinesisConnectorFactory();\n }\n return ImmutableList.of(this.factory);\n }", "class_method_signature": "KinesisPlugin.getConnector...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1014
{ "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 testGroupByWithSubquerySelectExpression()\n {\n analyze(\"SELECT (SELECT t1.a) FROM t1 GROUP BY a\");\n analyze(\"SELECT (SELECT a) FROM t1 GROUP BY t1.a\");\n\n // u.a is not GROUP-ed BY and it is used in select Subquery expression\n analyze(\"SELECT (...
{ "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_1151
{ "fields": [ { "declarator": "executor", "modifier": "private", "original_string": "private ExecutorService executor;", "type": "ExecutorService", "var_name": "executor" }, { "declarator": "invoked", "modifier": "private static", "original_string": "private...
{ "body": "@Test\n public void testExecuteNoPermission()\n {\n TransactionManager transactionManager = createTransactionManager();\n MetadataManager metadata = createMetadataManager(transactionManager);\n AccessControl accessControl = new DenyAllAccessControl();\n QueryStateMachine s...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/CallTask.java", "identifier": "CallTask", "interfaces": "implements DataDefinitionTask<Call>", "methods": [ { "class_method_signature": "CallTask.getName()", "constructor": false, "full_signature": "@Override publi...
{ "body": "@Override\n public ListenableFuture<?> execute(Call call, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)\n {\n if (!transactionManager.isAutoCommit(stateMachine.getSession().getRequiredTransact...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_532
{ "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 testClientTags()\n {\n ResourceGroupId resourceGroupId = new ResourceGroupId(new ResourceGroupId(\"global\"), \"foo\");\n StaticSelector selector = new StaticSelector(\n Optional.empty(),\n Optional.empty(),\n Optional.emp...
{ "fields": [ { "declarator": "NAMED_GROUPS_PATTERN = Pattern.compile(\"\\\\(\\\\?<([a-zA-Z][a-zA-Z0-9]*)>\")", "modifier": "private static final", "original_string": "private static final Pattern NAMED_GROUPS_PATTERN = Pattern.compile(\"\\\\(\\\\?<([a-zA-Z][a-zA-Z0-9]*)>\");", "type": "Pa...
{ "body": "@Override\n public Optional<SelectionContext<ResourceGroupIdTemplate>> match(SelectionCriteria criteria)\n {\n Map<String, String> variables = new HashMap<>();\n\n if (userRegex.isPresent()) {\n Matcher userMatcher = userRegex.get().matcher(criteria.getUser());\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_498
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestRange.java", "identifier": "TestRange", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testContains()\n {\n assertTrue(Range.all(BIGINT).contains(Range.all(BIGINT)));\n assertTrue(Range.all(BIGINT).contains(Range.equal(BIGINT, 0L)));\n assertTrue(Range.all(BIGINT).contains(Range.greaterThan(BIGINT, 0L)));\n assertTrue(Range.equal(BIGINT, ...
{ "fields": [ { "declarator": "low", "modifier": "private final", "original_string": "private final Marker low;", "type": "Marker", "var_name": "low" }, { "declarator": "high", "modifier": "private final", "original_string": "private final Marker high;", ...
{ "body": "public boolean contains(Range other)\n {\n checkTypeCompatibility(other);\n return this.getLow().compareTo(other.getLow()) <= 0 &&\n this.getHigh().compareTo(other.getHigh()) >= 0;\n }", "class_method_signature": "Range.contains(Range other)", "constructor": false, ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_162
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/TestHiveColumnHandle.java", "identifier": "TestHiveColumnHandle", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRegularColumn()\n {\n HiveColumnHandle expectedPartitionColumn = createBaseColumn(\"name\", 88, HiveType.HIVE_FLOAT, DOUBLE, PARTITION_KEY, Optional.empty());\n testRoundTrip(expectedPartitionColumn);\n }", "class_method_signature": "TestHiveColumnHandle.tes...
{ "fields": [ { "declarator": "PATH_COLUMN_INDEX = -11", "modifier": "public static final", "original_string": "public static final int PATH_COLUMN_INDEX = -11;", "type": "int", "var_name": "PATH_COLUMN_INDEX" }, { "declarator": "PATH_COLUMN_NAME = \"$path\"", "mo...
{ "body": "public static HiveColumnHandle createBaseColumn(\n String topLevelColumnName,\n int topLevelColumnIndex,\n HiveType hiveType,\n Type type,\n ColumnType columnType,\n Optional<String> comment)\n {\n return new HiveColumnHandle(topLe...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1278
{ "fields": [ { "declarator": "NO_CREATED_BY = Optional.empty()", "modifier": "private static final", "original_string": "private static final Optional<String> NO_CREATED_BY = Optional.empty();", "type": "Optional<String>", "var_name": "NO_CREATED_BY" }, { "declarator":...
{ "body": "@Test(dataProvider = \"allCreatedBy\")\n public void testReadStatsBinary(Optional<String> fileCreatedBy)\n {\n PrimitiveType varbinary = new PrimitiveType(OPTIONAL, BINARY, \"Test column\");\n\n Statistics statistics = new Statistics();\n statistics.setNull_count(13);\n st...
{ "fields": [ { "declarator": "MAGIC = Slices.utf8Slice(\"PAR1\")", "modifier": "private static final", "original_string": "private static final Slice MAGIC = Slices.utf8Slice(\"PAR1\");", "type": "Slice", "var_name": "MAGIC" }, { "declarator": "POST_SCRIPT_SIZE = Integ...
{ "body": "public static org.apache.parquet.column.statistics.Statistics<?> readStats(Optional<String> fileCreatedBy, Optional<Statistics> statisticsFromFile, PrimitiveType type)\n {\n Statistics statistics = statisticsFromFile.orElse(null);\n org.apache.parquet.column.statistics.Statistics<?> column...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_861
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testHammingDistance()\n {\n assertFunction(\"HAMMING_DISTANCE('', '')\", BIGINT, 0L);\n assertFunction(\"HAMMING_DISTANCE('hello', 'hello')\", BIGINT, 0L);\n assertFunction(\"HAMMING_DISTANCE('hello', 'jello')\", BIGINT, 1L);\n assertFunction(\"HAMMING_...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java", "identifier": "StringFunctions", "interfaces": "", "methods": [ { "class_method_signature": "StringFunctions.StringFunctions()", "constructor": true, "full_signature": "private StringF...
{ "body": "@Description(\"Computes Hamming distance between two strings\")\n @ScalarFunction\n @LiteralParameters({\"x\", \"y\"})\n @SqlType(StandardTypes.BIGINT)\n public static long hammingDistance(@SqlType(\"varchar(x)\") Slice left, @SqlType(\"varchar(y)\") Slice right)\n {\n int distance = ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_14
{ "fields": [], "file": "presto-atop/src/test/java/io/prestosql/plugin/atop/TestAtopPlugin.java", "identifier": "TestAtopPlugin", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetConnectorFactory()\n {\n AtopPlugin plugin = new AtopPlugin();\n assertInstanceOf(getOnlyElement(plugin.getConnectorFactories()), AtopConnectorFactory.class);\n }", "class_method_signature": "TestAtopPlugin.testGetConnectorFactory()", "constructor": fal...
{ "fields": [], "file": "presto-atop/src/main/java/io/prestosql/plugin/atop/AtopPlugin.java", "identifier": "AtopPlugin", "interfaces": "implements Plugin", "methods": [ { "class_method_signature": "AtopPlugin.getConnectorFactories()", "constructor": false, "full_signature": "@Override p...
{ "body": "@Override\n public Iterable<ConnectorFactory> getConnectorFactories()\n {\n return ImmutableList.of(new AtopConnectorFactory(AtopProcessFactory.class, AtopPlugin.class.getClassLoader()));\n }", "class_method_signature": "AtopPlugin.getConnectorFactories()", "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_924
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/TestCompilerConfig.java", "identifier": "TestCompilerConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"compiler.expression-cache-size\", \"52\")\n .build();\n\n CompilerConfig expected = new CompilerConfig()\n ...
{ "fields": [ { "declarator": "expressionCacheSize = 10_000", "modifier": "private", "original_string": "private int expressionCacheSize = 10_000;", "type": "int", "var_name": "expressionCacheSize" } ], "file": "presto-main/src/main/java/io/prestosql/sql/planner/CompilerConfi...
{ "body": "@Config(\"compiler.expression-cache-size\")\n @Description(\"Reuse compiled expressions across multiple queries\")\n public CompilerConfig setExpressionCacheSize(int expressionCacheSize)\n {\n this.expressionCacheSize = expressionCacheSize;\n return this;\n }", "class_method_sig...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_477
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestAllOrNoneValueSet.java", "identifier": "TestAllOrNoneValueSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnion()\n {\n AllOrNoneValueSet all = AllOrNoneValueSet.all(HYPER_LOG_LOG);\n AllOrNoneValueSet none = AllOrNoneValueSet.none(HYPER_LOG_LOG);\n\n assertEquals(all.union(all), all);\n assertEquals(all.union(none), all);\n assertEquals(none.uni...
{ "fields": [ { "declarator": "type", "modifier": "private final", "original_string": "private final Type type;", "type": "Type", "var_name": "type" }, { "declarator": "all", "modifier": "private final", "original_string": "private final boolean all;", ...
{ "body": "@Override\n public ValueSet union(ValueSet other)\n {\n AllOrNoneValueSet otherValueSet = checkCompatibility(other);\n return new AllOrNoneValueSet(type, all || otherValueSet.all);\n }", "class_method_signature": "AllOrNoneValueSet.union(ValueSet other)", "constructor": false, ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_709
{ "fields": [ { "declarator": "nodeInfo = new NodeInfo(\"test\")", "modifier": "private final", "original_string": "private final NodeInfo nodeInfo = new NodeInfo(\"test\");", "type": "NodeInfo", "var_name": "nodeInfo" }, { "declarator": "internalCommunicationConfig = n...
{ "body": "@Test\n public void testGetAllNodes()\n {\n DiscoveryNodeManager manager = new DiscoveryNodeManager(selector, nodeInfo, new NoOpFailureDetector(), expectedVersion, testHttpClient, internalCommunicationConfig);\n try {\n AllNodes allNodes = manager.getAllNodes();\n\n ...
{ "fields": [ { "declarator": "log = Logger.get(DiscoveryNodeManager.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(DiscoveryNodeManager.class);", "type": "Logger", "var_name": "log" }, { "declarator": "CONN...
{ "body": "@Override\n public synchronized AllNodes getAllNodes()\n {\n return allNodes;\n }", "class_method_signature": "DiscoveryNodeManager.getAllNodes()", "constructor": false, "full_signature": "@Override public synchronized AllNodes getAllNodes()", "identifier": "getAllNodes", "invocat...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_359
{ "fields": [], "file": "presto-parser/src/test/java/io/prestosql/sql/parser/TestStatementSplitter.java", "identifier": "TestStatementSplitter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSqueezeStatement()\n {\n String sql = \"select * from\\n foo\\n order by x ; \";\n assertEquals(squeezeStatement(sql), \"select * from foo order by x ;\");\n }", "class_method_signature": "TestStatementSplitter.testSqueezeStatement()", "constructor": f...
{ "fields": [ { "declarator": "completeStatements", "modifier": "private final", "original_string": "private final List<Statement> completeStatements;", "type": "List<Statement>", "var_name": "completeStatements" }, { "declarator": "partialStatement", "modifier": ...
{ "body": "public static String squeezeStatement(String sql)\n {\n TokenSource tokens = getLexer(sql, ImmutableSet.of());\n StringBuilder sb = new StringBuilder();\n while (true) {\n Token token = tokens.nextToken();\n if (token.getType() == Token.EOF) {\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_1043
{ "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 testNestedWith()\n {\n // effectively non recursive\n assertFails(\"WITH RECURSIVE t(n) AS (\" +\n \" SELECT * FROM (WITH RECURSIVE t2(m) AS (SELECT 1) SELECT m FROM t2)\" +\n \" )\" +\n \" SELEC...
{ "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_1106
{ "fields": [ { "declarator": "session = TestingSession.testSessionBuilder().build()", "modifier": "private static final", "original_string": "private static final Session session = TestingSession.testSessionBuilder().build();", "type": "Session", "var_name": "session" } ], "...
{ "body": "@Test\n public void testSourceStageInnerLazyDynamicFilters()\n {\n DynamicFilterId dynamicFilterId = new DynamicFilterId(\"filterId\");\n assertEquals(getSourceStageInnerLazyDynamicFilters(createPlan(dynamicFilterId, SOURCE_DISTRIBUTION, REPLICATE)), ImmutableSet.of(dynamicFilterId));\n...
{ "fields": [ { "declarator": "executor", "modifier": "private final", "original_string": "private final ExecutorService executor;", "type": "ExecutorService", "var_name": "executor" }, { "declarator": "dynamicFilterContexts = new ConcurrentHashMap<>()", "modifier...
{ "body": "@VisibleForTesting\n static Set<DynamicFilterId> getSourceStageInnerLazyDynamicFilters(PlanFragment plan)\n {\n if (!plan.getPartitioning().equals(SOURCE_DISTRIBUTION)) {\n // Only non-fixed source stages can have (replicated) lazy dynamic filters that are\n // produced a...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_836
{ "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 testSin()\n {\n for (double doubleValue : DOUBLE_VALUES) {\n assertFunction(\"sin(\" + doubleValue + \")\", DOUBLE, Math.sin(doubleValue));\n assertFunction(\"sin(REAL '\" + (float) doubleValue + \"')\", DOUBLE, Math.sin((float) doubleValue));\n ...
{ "fields": [ { "declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()", "modifier": "public static final", "original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();", "type": "SqlScalarFunction", "var_name": "DECIMAL_MOD_FUNCTION" ...
{ "body": "@Description(\"Sine\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double sin(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Math.sin(num);\n }", "class_method_signature": "MathFunctions.sin(@SqlType(StandardTypes.DOUBLE) double num)", "constructor"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_43
{ "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 testSchemaRulesForCheckCanShowSchemas()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-visibility.json\");\n\n accessControl.checkCanShowSchemas(ADMIN, \"specific-catalog\");\n accessControl.checkCanShowSch...
{ "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 checkCanShowSchemas(SystemSecurityContext context, String catalogName)\n {\n if (!checkAnyCatalogAccess(context, catalogName)) {\n denyShowSchemas();\n }\n }", "class_method_signature": "FileBasedSystemAccessControl.checkCanShowSchemas(SystemSecur...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_135
{ "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 testCalculateNullsFractionForPartitioningKey()\n {\n assertEquals(\n calculateNullsFractionForPartitioningKey(\n PARTITION_COLUMN_1,\n ImmutableList.of(partition(\"p1=string1/p2=1234\")),\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": "@VisibleForTesting\n static double calculateNullsFractionForPartitioningKey(\n HiveColumnHandle column,\n List<HivePartition> partitions,\n Map<String, PartitionStatistics> statistics,\n double averageRowsPerPartition,\n double rowCount)\n {\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_565
{ "fields": [ { "declarator": "SPLIT_SIZE = 100", "modifier": "private static final", "original_string": "private static final int SPLIT_SIZE = 100;", "type": "int", "var_name": "SPLIT_SIZE" }, { "declarator": "KEYSPACE = \"test_cassandra_token_split_manager_keyspace\""...
{ "body": "@Test\n public void testEmptyTable()\n throws Exception\n {\n String tableName = \"empty_table\";\n session.execute(format(\"CREATE TABLE %s.%s (key text PRIMARY KEY)\", KEYSPACE, tableName));\n server.refreshSizeEstimates(KEYSPACE, tableName);\n List<TokenSplit...
{ "fields": [ { "declarator": "session", "modifier": "private final", "original_string": "private final CassandraSession session;", "type": "CassandraSession", "var_name": "session" }, { "declarator": "splitSize", "modifier": "private final", "original_strin...
{ "body": "public List<TokenSplit> getSplits(String keyspace, String table, Optional<Long> sessionSplitsPerNode)\n {\n Set<TokenRange> tokenRanges = session.getTokenRanges();\n\n if (tokenRanges.isEmpty()) {\n throw new PrestoException(CASSANDRA_METADATA_ERROR, \"The cluster metadata is no...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_420
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTPointN()\n {\n assertPointN(\"LINESTRING(1 2, 3 4, 5 6, 7 8)\", 1, \"POINT (1 2)\");\n assertPointN(\"LINESTRING(1 2, 3 4, 5 6, 7 8)\", 3, \"POINT (5 6)\");\n assertPointN(\"LINESTRING(1 2, 3 4, 5 6, 7 8)\", 10, null);\n assertPointN(\"LINESTRING(...
{ "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 the vertex of a linestring at the specified index (indices started with 1) \")\n @ScalarFunction(\"ST_PointN\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice stPointN(@SqlType(GEOMETRY_TYPE_NAME) Slice input, @SqlType(INTEGER) long index)\n {\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_973
{ "fields": [ { "declarator": "zeroRewriter = new ExpressionRewriteRuleSet(\n (expression, context) -> new LongLiteral(\"0\"))", "modifier": "private", "original_string": "private ExpressionRewriteRuleSet zeroRewriter = new ExpressionRewriteRuleSet(\n (expression, context) ...
{ "body": "@Test\n public void testValueExpressionNotRewritten()\n {\n tester().assertThat(zeroRewriter.valuesExpressionRewrite())\n .on(p -> p.values(\n ImmutableList.<Symbol>of(p.symbol(\"a\")),\n ImmutableList.of((ImmutableList.of(PlanBuilde...
{ "fields": [ { "declarator": "rewriter", "modifier": "private final", "original_string": "private final ExpressionRewriter rewriter;", "type": "ExpressionRewriter", "var_name": "rewriter" } ], "file": "presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/Express...
{ "body": "public Rule<?> valuesExpressionRewrite()\n {\n return new ValuesExpressionRewrite(rewriter);\n }", "class_method_signature": "ExpressionRewriteRuleSet.valuesExpressionRewrite()", "constructor": false, "full_signature": "public Rule<?> valuesExpressionRewrite()", "identifier": "valuesEx...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_637
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestDoubleOperators.java", "identifier": "TestDoubleOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSubtract()\n {\n assertFunction(\"37.7E0 - 37.7E0\", DOUBLE, 37.7 - 37.7);\n assertFunction(\"37.7E0 - 17.1E0\", DOUBLE, 37.7 - 17.1);\n assertFunction(\"17.1E0 - 37.7E0\", DOUBLE, 17.1 - 37.7);\n assertFunction(\"17.1E0 - 17.1E0\", DOUBLE, 17.1 - 1...
{ "fields": [ { "declarator": "MIN_INTEGER_AS_DOUBLE = -0x1p31", "modifier": "private static final", "original_string": "private static final double MIN_INTEGER_AS_DOUBLE = -0x1p31;", "type": "double", "var_name": "MIN_INTEGER_AS_DOUBLE" }, { "declarator": "MAX_INTEGER_...
{ "body": "@ScalarOperator(SUBTRACT)\n @SqlType(StandardTypes.DOUBLE)\n public static double subtract(@SqlType(StandardTypes.DOUBLE) double left, @SqlType(StandardTypes.DOUBLE) double right)\n {\n return left - right;\n }", "class_method_signature": "DoubleOperators.subtract(@SqlType(StandardType...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_267
{ "fields": [ { "declarator": "DATE_TIME = new DateTime(1970, 1, 2, 0, 0, 0, UTC)", "modifier": "private static final", "original_string": "private static final DateTime DATE_TIME = new DateTime(1970, 1, 2, 0, 0, 0, UTC);", "type": "DateTime", "var_name": "DATE_TIME" } ], "fi...
{ "body": "@Test\n public void testTimestampShardRange()\n {\n // The time frame should be look like following:\n\n // time range covers full day of day 1\n assertEquals(TemporalFunction.getDayFromRange(timeRange(DATE_TIME.getMillis(), Duration.ofDays(1))), 1);\n // time range covers...
{ "fields": [], "file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/storage/organization/TemporalFunction.java", "identifier": "TemporalFunction", "interfaces": "", "methods": [ { "class_method_signature": "TemporalFunction.TemporalFunction()", "constructor": true, ...
{ "body": "public static int getDayFromRange(ShardRange range)\n {\n Tuple min = range.getMinTuple();\n Tuple max = range.getMaxTuple();\n checkArgument(getOnlyElement(min.getTypes()).equals(getOnlyElement(max.getTypes())), \"type of min and max is not same\");\n\n Type type = getOnlyEl...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_288
{ "fields": [], "file": "presto-thrift-api/src/test/java/io/prestosql/plugin/thrift/api/datatypes/TestPrestoThriftBigint.java", "identifier": "TestPrestoThriftBigint", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReadBlockAllNonNullOption2()\n {\n PrestoThriftBlock columnsData = longColumn(\n new boolean[] {false, false, false, false, false, false, false},\n new long[] {2, 7, 1, 3, 8, 4, 5});\n Block actual = columnsData.toBlock(BIGINT);\n ...
{ "fields": [ { "declarator": "nulls", "modifier": "private final", "original_string": "private final boolean[] nulls;", "type": "boolean[]", "var_name": "nulls" }, { "declarator": "longs", "modifier": "private final", "original_string": "private final long[...
{ "body": "@Override\n public Block toBlock(Type desiredType)\n {\n checkArgument(BIGINT.equals(desiredType), \"type doesn't match: %s\", desiredType);\n int numberOfRecords = numberOfRecords();\n return new LongArrayBlock(\n numberOfRecords,\n Optional.ofNulla...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_772
{ "fields": [ { "declarator": "executor", "modifier": "private", "original_string": "private ExecutorService executor;", "type": "ExecutorService", "var_name": "executor" }, { "declarator": "scheduledExecutor", "modifier": "private", "original_string": "priv...
{ "body": "@Test(dataProvider = \"hashEnabledValues\")\n public void testBuildSideNulls(boolean hashEnabled)\n {\n DriverContext driverContext = taskContext.addPipelineContext(0, true, true, false).addDriverContext();\n\n // build\n OperatorContext operatorContext = driverContext.addOperato...
{ "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/HashSemiJoinOperator.java", "i...
{ "body": "public static OperatorFactory createOperatorFactory(\n int operatorId,\n PlanNodeId planNodeId,\n SetSupplier setSupplier,\n List<? extends Type> probeTypes,\n int probeJoinChannel,\n Optional<Integer> probeJoinHashChannel)\n {\n r...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_322
{ "fields": [ { "declarator": "NUMBERS_TABLE_HANDLE = new ExampleTableHandle(\"example\", \"numbers\")", "modifier": "private static final", "original_string": "private static final ExampleTableHandle NUMBERS_TABLE_HANDLE = new ExampleTableHandle(\"example\", \"numbers\");", "type": "Examp...
{ "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(\"tpch\", \"orders\"),\n ...
{ "fields": [ { "declarator": "exampleClient", "modifier": "private final", "original_string": "private final ExampleClient exampleClient;", "type": "ExampleClient", "var_name": "exampleClient" } ], "file": "presto-example-http/src/main/java/io/prestosql/plugin/example/Exampl...
{ "body": "@Override\n public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> optionalSchemaName)\n {\n Set<String> schemaNames = optionalSchemaName.map(ImmutableSet::of)\n .orElseGet(() -> ImmutableSet.copyOf(exampleClient.getSchemaNames()));\n\n Immutab...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1192
{ "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 testAcknowledge()\n {\n OutputBuffers outputBuffers = createInitialEmptyOutputBuffers(BROADCAST);\n BroadcastOutputBuffer buffer = createBroadcastBuffer(outputBuffers, sizeOfPages(10));\n\n // add three items\n for (int i = 0; i < 3; i++) {\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": "@Override\n public void acknowledge(OutputBufferId bufferId, long sequenceId)\n {\n checkState(!Thread.holdsLock(this), \"Cannot acknowledge pages while holding a lock on this\");\n requireNonNull(bufferId, \"bufferId is null\");\n\n getBuffer(bufferId).acknowledgePages(sequenceI...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1038
{ "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 testRollback()\n {\n analyze(\"ROLLBACK\");\n analyze(\"ROLLBACK WORK\");\n }", "class_method_signature": "TestAnalyzer.testRollback()", "constructor": false, "full_signature": "@Test public void testRollback()", "identifier": "testRollback", "invocation...
{ "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_908
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/optimizations/TestLocalProperties.java", "identifier": "TestLocalProperties", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSortGroupSort()\n {\n List<LocalProperty<String>> actual = builder()\n .sorted(\"a\", SortOrder.ASC_NULLS_FIRST)\n .grouped(\"b\", \"c\")\n .sorted(\"d\", SortOrder.ASC_NULLS_FIRST)\n .build();\n\n asser...
{ "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_38
{ "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 testTableRulesForCheckCanSetTableComment()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-table.json\");\n\n accessControl.checkCanSetTableComment(ADMIN, 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 checkCanSetTableComment(SystemSecurityContext context, CatalogSchemaTableName table)\n {\n if (!checkTablePermission(context, table, OWNERSHIP)) {\n denyCommentTable(table.toString());\n }\n }", "class_method_signature": "FileBasedSystemAccessCont...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1254
{ "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 testTimestampMicros()\n {\n assertThat(getDomain(TIMESTAMP_MICROS, 0, null))\n .isEqualTo(none(TIMESTAMP_MICROS));\n assertThat(getDomain(TIMESTAMP_MICROS, 10, null))\n .isEqualTo(all(TIMESTAMP_MICROS));\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_230
{ "fields": [ { "declarator": "dbi", "modifier": "private", "original_string": "private IDBI dbi;", "type": "IDBI", "var_name": "dbi" }, { "declarator": "dummyHandle", "modifier": "private", "original_string": "private Handle dummyHandle;", "type": "Ha...
{ "body": "@Test\n public void testDeleteOldShards()\n {\n assertEquals(cleaner.getBackupShardsQueued().getTotalCount(), 0);\n\n ShardDao dao = dbi.onDemand(ShardDao.class);\n\n UUID shard1 = randomUUID();\n UUID shard2 = randomUUID();\n UUID shard3 = randomUUID();\n\n ...
{ "fields": [ { "declarator": "log = Logger.get(ShardCleaner.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(ShardCleaner.class);", "type": "Logger", "var_name": "log" }, { "declarator": "dao", "modifie...
{ "body": "@VisibleForTesting\n void deleteOldShards()\n {\n while (!Thread.currentThread().isInterrupted()) {\n List<UUID> shards = dao.getOldCreatedShardsBatch();\n if (shards.isEmpty()) {\n break;\n }\n dao.insertDeletedShards(shards);\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_660
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestTinyintOperators.java", "identifier": "TestTinyintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToSmallint()\n {\n assertFunction(\"cast(TINYINT'37' as smallint)\", SMALLINT, (short) 37);\n assertFunction(\"cast(TINYINT'17' as smallint)\", SMALLINT, (short) 17);\n }", "class_method_signature": "TestTinyintOperators.testCastToSmallint()", "constru...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/TinyintOperators.java", "identifier": "TinyintOperators", "interfaces": "", "methods": [ { "class_method_signature": "TinyintOperators.TinyintOperators()", "constructor": true, "full_signature": "private TinyintOperato...
{ "body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.SMALLINT)\n public static long castToSmallint(@SqlType(StandardTypes.TINYINT) long value)\n {\n return value;\n }", "class_method_signature": "TinyintOperators.castToSmallint(@SqlType(StandardTypes.TINYINT) long value)", "constructor": f...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1080
{ "fields": [ { "declarator": "LEFT_JOIN_COLUMN = \"left_join_column\"", "modifier": "private static final", "original_string": "private static final String LEFT_JOIN_COLUMN = \"left_join_column\";", "type": "String", "var_name": "LEFT_JOIN_COLUMN" }, { "declarator": "L...
{ "body": "@Test\n public void testLeftJoinComplementStatsWithMultipleClauses()\n {\n PlanNodeStatsEstimate expected = planNodeStats(\n LEFT_ROWS_COUNT * (LEFT_JOIN_COLUMN_NULLS + LEFT_JOIN_COLUMN_NON_NULLS / 4),\n symbolStatistics(LEFT_JOIN_COLUMN, 0.0, 20.0, LEFT_JOIN_COLU...
{ "fields": [ { "declarator": "PATTERN = join()", "modifier": "private static final", "original_string": "private static final Pattern<JoinNode> PATTERN = join();", "type": "Pattern<JoinNode>", "var_name": "PATTERN" }, { "declarator": "DEFAULT_UNMATCHED_JOIN_COMPLEMENT_...
{ "body": "@VisibleForTesting\n PlanNodeStatsEstimate calculateJoinComplementStats(\n Optional<Expression> filter,\n List<JoinNode.EquiJoinClause> criteria,\n PlanNodeStatsEstimate leftStats,\n PlanNodeStatsEstimate rightStats,\n TypeProvider types)\n {\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_375
{ "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 testCreateGroupedStatePresent()\n {\n GeometryState state = factory.createGroupedState();\n assertNull(state.getGeometry());\n assertTrue(state instanceof GeometryStateFactory.GroupedGeometryState);\n GeometryStateFactory.GroupedGeometryState groupedSta...
{ "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 createGroupedState()\n {\n return new GroupedGeometryState();\n }", "class_method_signature": "GeometryStateFactory.createGroupedState()", "constructor": false, "full_signature": "@Override public GeometryState createGroupedState()", "identifier": "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_725
{ "fields": [ { "declarator": "blockTypeOperators = new BlockTypeOperators(new TypeOperators())", "modifier": "private", "original_string": "private BlockTypeOperators blockTypeOperators = new BlockTypeOperators(new TypeOperators());", "type": "BlockTypeOperators", "var_name": "block...
{ "body": "@Test\n public void testBinaryMergeIteratorOverEmptyPage()\n {\n Page emptyPage = new Page(0, BIGINT.createFixedSizeBlockBuilder(0).build());\n\n WorkProcessor<Page> mergedPage = new MergeHashSort(newSimpleAggregatedMemoryContext(), blockTypeOperators).merge(\n ImmutableL...
{ "fields": [ { "declarator": "memoryContext", "modifier": "private final", "original_string": "private final AggregatedMemoryContext memoryContext;", "type": "AggregatedMemoryContext", "var_name": "memoryContext" }, { "declarator": "blockTypeOperators", "modifier...
{ "body": "public WorkProcessor<Page> merge(List<Type> keyTypes, List<Type> allTypes, List<WorkProcessor<Page>> channels, DriverYieldSignal driverYieldSignal)\n {\n InterpretedHashGenerator hashGenerator = createHashGenerator(keyTypes);\n return mergeSortedPages(\n channels,\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_80
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTinyintConversion()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addIntegerValues(\"col1\", Long.valueOf(Byte.MAX_VALUE))\n .build();\n String expression = buildGlueExpression(ImmutableList.of(\"col1\"), filter,...
{ "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_549
{ "fields": [ { "declarator": "POSITIONS_PER_PAGE = 0", "modifier": "private static final", "original_string": "private static final int POSITIONS_PER_PAGE = 0;", "type": "int", "var_name": "POSITIONS_PER_PAGE" }, { "declarator": "pagesStore", "modifier": "private...
{ "body": "@Test\n public void testInsertPageWithoutCreate()\n {\n insertToTable(0L, 0L);\n assertEquals(pagesStore.getPages(0L, 0, 1, ImmutableList.of(0), POSITIONS_PER_PAGE, OptionalLong.empty(), OptionalDouble.empty()).size(), 1);\n }", "class_method_signature": "TestMemoryPagesStore.testI...
{ "fields": [ { "declarator": "maxBytes", "modifier": "private final", "original_string": "private final long maxBytes;", "type": "long", "var_name": "maxBytes" }, { "declarator": "currentBytes", "modifier": "@GuardedBy(\"this\")\n private", "original_str...
{ "body": "public synchronized List<Page> getPages(\n Long tableId,\n int partNumber,\n int totalParts,\n List<Integer> columnIndexes,\n long expectedRows,\n OptionalLong limit,\n OptionalDouble sampleRatio)\n {\n if (!contains(tab...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_119
{ "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 testNoCacheExceptions()\n {\n // Throw exceptions on usage\n mockClient.setThrowException(true);\n try {\n metastore.getAllDatabases();\n }\n catch (RuntimeException ignored) {\n }\n assertEquals(mockClient.getAccessCount...
{ "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_1203
{ "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 testAbort()\n {\n ArbitraryOutputBuffer buffer = createArbitraryBuffer(createInitialEmptyOutputBuffers(ARBITRARY), sizeOfPages(10));\n\n // fill the buffer\n for (int i = 0; i < 10; i++) {\n addPage(buffer, createPage(i));\n }\n buffer...
{ "fields": [ { "declarator": "memoryManager", "modifier": "private final", "original_string": "private final OutputBufferMemoryManager memoryManager;", "type": "OutputBufferMemoryManager", "var_name": "memoryManager" }, { "declarator": "outputBuffers = createInitialEmp...
{ "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_1096
{ "fields": [ { "declarator": "BOOLEAN_COLUMN = name -> new Column(name, BOOLEAN, new ClientTypeSignature(BOOLEAN))", "modifier": "private static final", "original_string": "private static final Function<String, Column> BOOLEAN_COLUMN = name -> new Column(name, BOOLEAN, new ClientTypeSignature(B...
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = \"columns and types size mismatch\")\n public void shouldThrowWhenColumnsAndTypesSizeMismatch()\n {\n List<Column> columns = ImmutableList.of(INT_COLUMN.apply(\"_col0\"));\n List<Type> types = I...
{ "fields": [ { "declarator": "session", "modifier": "private final", "original_string": "private final ConnectorSession session;", "type": "ConnectorSession", "var_name": "session" }, { "declarator": "columns", "modifier": "private final", "original_string"...
{ "body": "public static Builder queryResultRowsBuilder(Session session)\n {\n return new Builder(session);\n }", "class_method_signature": "QueryResultRows.queryResultRowsBuilder(Session session)", "constructor": false, "full_signature": "public static Builder queryResultRowsBuilder(Session 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_676
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" }, { "declarator": "re2jType = metadata.g...
{ "body": "@Test\n public void testIsTypeOnlyCoercion()\n {\n assertTrue(typeCoercion.isTypeOnlyCoercion(BIGINT, BIGINT));\n assertTrue(typeCoercion.isTypeOnlyCoercion(createVarcharType(42), createVarcharType(44)));\n assertFalse(typeCoercion.isTypeOnlyCoercion(createVarcharType(44), create...
{ "fields": [ { "declarator": "lookupType", "modifier": "private final", "original_string": "private final Function<TypeSignature, Type> lookupType;", "type": "Function<TypeSignature, Type>", "var_name": "lookupType" } ], "file": "presto-main/src/main/java/io/prestosql/type/T...
{ "body": "public boolean isTypeOnlyCoercion(Type source, Type result)\n {\n if (source.equals(result)) {\n return true;\n }\n\n if (!canCoerce(source, result)) {\n return false;\n }\n\n if (source instanceof VarcharType && result instanceof VarcharType) {\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_226
{ "fields": [ { "declarator": "dbi", "modifier": "private", "original_string": "private IDBI dbi;", "type": "IDBI", "var_name": "dbi" }, { "declarator": "dummyHandle", "modifier": "private", "original_string": "private Handle dummyHandle;", "type": "Ha...
{ "body": "@Test\n public void testGetNodeBytes()\n {\n long tableId = createTable(\"test\");\n OptionalInt bucketNumber = OptionalInt.empty();\n\n UUID shard1 = UUID.randomUUID();\n UUID shard2 = UUID.randomUUID();\n List<ShardInfo> shardNodes = ImmutableList.of(\n ...
{ "fields": [ { "declarator": "log = Logger.get(DatabaseShardManager.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(DatabaseShardManager.class);", "type": "Logger", "var_name": "log" }, { "declarator": "INDE...
{ "body": "@Override\n public Map<String, Long> getNodeBytes()\n {\n return dao.getNodeSizes().stream()\n .collect(toMap(NodeSize::getNodeIdentifier, NodeSize::getSizeInBytes));\n }", "class_method_signature": "DatabaseShardManager.getNodeBytes()", "constructor": false, "full_sign...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_733
{ "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\n public void testUnderflowAfterOverflow()\n {\n addToState(state, TWO.pow(126));\n addToState(state, TWO.pow(126));\n addToState(state, TWO.pow(125));\n\n assertEquals(state.getOverflow(), 1);\n assertEquals(state.getLongDecimal(), unscaledDecimal(TWO.pow(125...
{ "fields": [ { "declarator": "DECIMAL_AVERAGE_AGGREGATION = new DecimalAverageAggregation()", "modifier": "public static final", "original_string": "public static final DecimalAverageAggregation DECIMAL_AVERAGE_AGGREGATION = new DecimalAverageAggregation();", "type": "DecimalAverageAggreg...
{ "body": "@VisibleForTesting\n public static BigDecimal average(LongDecimalWithOverflowAndLongState state, DecimalType type)\n {\n BigDecimal sum = new BigDecimal(Decimals.decodeUnscaledValue(state.getLongDecimal()), type.getScale());\n BigDecimal count = BigDecimal.valueOf(state.getLong());\n\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_699
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestRealOperators.java", "identifier": "TestRealOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToVarchar()\n {\n assertFunction(\"CAST(REAL'754.1985' as VARCHAR)\", VARCHAR, \"754.1985\");\n assertFunction(\"CAST(REAL'-754.2008' as VARCHAR)\", VARCHAR, \"-754.2008\");\n assertFunction(\"CAST(REAL'Infinity' as VARCHAR)\", VARCHAR, \"Infinity\");\...
{ "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 @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice castToVarchar(@SqlType(StandardTypes.REAL) long value)\n {\n return utf8Slice(String.valueOf(intBitsToFloat((int) value)));\n }", "class_method_signature": "RealOperators.castToVarchar...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_363
{ "fields": [], "file": "presto-parser/src/test/java/io/prestosql/sql/parser/TestStatementSplitter.java", "identifier": "TestStatementSplitter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSqueezeStatementError()\n {\n String sql = \"select * from z#oops\";\n assertEquals(squeezeStatement(sql), \"select * from z#oops\");\n }", "class_method_signature": "TestStatementSplitter.testSqueezeStatementError()", "constructor": false, "full_sign...
{ "fields": [ { "declarator": "completeStatements", "modifier": "private final", "original_string": "private final List<Statement> completeStatements;", "type": "List<Statement>", "var_name": "completeStatements" }, { "declarator": "partialStatement", "modifier": ...
{ "body": "public static String squeezeStatement(String sql)\n {\n TokenSource tokens = getLexer(sql, ImmutableSet.of());\n StringBuilder sb = new StringBuilder();\n while (true) {\n Token token = tokens.nextToken();\n if (token.getType() == Token.EOF) {\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_1079
{ "fields": [ { "declarator": "LEFT_JOIN_COLUMN = \"left_join_column\"", "modifier": "private static final", "original_string": "private static final String LEFT_JOIN_COLUMN = \"left_join_column\";", "type": "String", "var_name": "LEFT_JOIN_COLUMN" }, { "declarator": "L...
{ "body": "@Test\n public void testLeftJoinComplementStatsWithNoClauses()\n {\n PlanNodeStatsEstimate expected = NORMALIZER.normalize(LEFT_STATS.mapOutputRowCount(rowCount -> 0.0), TYPES);\n PlanNodeStatsEstimate actual = JOIN_STATS_RULE.calculateJoinComplementStats(\n Optional.empt...
{ "fields": [ { "declarator": "PATTERN = join()", "modifier": "private static final", "original_string": "private static final Pattern<JoinNode> PATTERN = join();", "type": "Pattern<JoinNode>", "var_name": "PATTERN" }, { "declarator": "DEFAULT_UNMATCHED_JOIN_COMPLEMENT_...
{ "body": "@VisibleForTesting\n PlanNodeStatsEstimate calculateJoinComplementStats(\n Optional<Expression> filter,\n List<JoinNode.EquiJoinClause> criteria,\n PlanNodeStatsEstimate leftStats,\n PlanNodeStatsEstimate rightStats,\n TypeProvider types)\n {\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_949
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestTransformUncorrelatedInPredicateSubqueryToSemiJoin.java", "identifier": "TestTransformUncorrelatedInPredicateSubqueryToSemiJoin", "interfaces": "", "superclass": "extends BaseRuleTest" }
{ "body": "@Test\n public void testDoesNotFireOnNoCorrelation()\n {\n tester().assertThat(new TransformUncorrelatedInPredicateSubqueryToSemiJoin())\n .on(p -> p.apply(\n Assignments.of(),\n emptyList(),\n p.values(),\n ...
{ "fields": [ { "declarator": "PATTERN = applyNode()\n .with(empty(correlation()))", "modifier": "private static final", "original_string": "private static final Pattern<ApplyNode> PATTERN = applyNode()\n .with(empty(correlation()));", "type": "Pattern<ApplyNode>", ...
{ "body": "@Override\n public Result apply(ApplyNode applyNode, Captures captures, Context context)\n {\n if (applyNode.getSubqueryAssignments().size() != 1) {\n return Result.empty();\n }\n\n Expression expression = getOnlyElement(applyNode.getSubqueryAssignments().getExpression...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_96
{ "fields": [ { "declarator": "TEST_SCHEMA = ImmutableList.of(\n new FieldSchema(\"col1\", \"bigint\", \"comment1\"),\n new FieldSchema(\"col2\", \"binary\", null),\n new FieldSchema(\"col3\", \"string\", null))", "modifier": "private static final", "original_str...
{ "body": "@Test\n public void testHiveSchemaPartition()\n {\n Properties expected = MetaStoreUtils.getPartitionMetadata(TEST_PARTITION_WITH_UNSUPPORTED_FIELDS, TEST_TABLE_WITH_UNSUPPORTED_FIELDS);\n expected.remove(COLUMN_NAME_DELIMITER);\n Properties actual = MetastoreUtil.getHiveSchema(T...
{ "fields": [ { "declarator": "HIVE_PARTITION_VALUE_WILDCARD = \"\"", "modifier": "private static final", "original_string": "private static final String HIVE_PARTITION_VALUE_WILDCARD = \"\";", "type": "String", "var_name": "HIVE_PARTITION_VALUE_WILDCARD" } ], "file": "presto...
{ "body": "public static Properties getHiveSchema(Table table)\n {\n // Mimics function in Hive: MetaStoreUtils.getTableMetadata(Table)\n return getHiveSchema(\n table.getStorage(),\n table.getDataColumns(),\n table.getDataColumns(),\n table...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_79
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSmallintConversion()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addIntegerValues(\"col1\", Long.valueOf(Short.MAX_VALUE))\n .build();\n String expression = buildGlueExpression(ImmutableList.of(\"col1\"), filte...
{ "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_1215
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/execution/scheduler/TestPhasedExecutionSchedule.java", "identifier": "TestPhasedExecutionSchedule", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRightJoin()\n {\n PlanFragment buildFragment = createTableScanPlanFragment(\"build\");\n PlanFragment probeFragment = createTableScanPlanFragment(\"probe\");\n PlanFragment joinFragment = createJoinPlanFragment(RIGHT, \"join\", buildFragment, probeFragment...
{ "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_271
{ "fields": [ { "declarator": "MAX_SHARD_ROWS = 1000", "modifier": "private static final", "original_string": "private static final int MAX_SHARD_ROWS = 1000;", "type": "int", "var_name": "MAX_SHARD_ROWS" }, { "declarator": "PAGE_SORTER = new PagesIndexPageSorter(new Pa...
{ "body": "@Test\n public void testShardCompactor()\n throws Exception\n {\n List<Long> columnIds = ImmutableList.of(3L, 7L, 2L, 1L, 5L);\n List<Type> columnTypes = ImmutableList.of(BIGINT, createVarcharType(20), DOUBLE, DATE, TIMESTAMP_MILLIS);\n\n List<ShardInfo> inputShards = ...
{ "fields": [ { "declarator": "storageManager", "modifier": "private final", "original_string": "private final StorageManager storageManager;", "type": "StorageManager", "var_name": "storageManager" }, { "declarator": "inputShards = new CounterStat()", "modifier":...
{ "body": "@Inject\n public ShardCompactor(StorageManager storageManager, StorageManagerConfig config, TypeManager typeManager)\n {\n this(storageManager,\n requireNonNull(config, \"config is null\").toOrcReaderOptions(),\n requireNonNull(typeManager, \"typeManager is null\"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_621
{ "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 testSimpleTwoStreams()\n {\n List<Type> types = ImmutableList.of(INTEGER);\n MaterializedResult actual = mergeSortedPages(\n types,\n ImmutableList.of(0),\n ImmutableList.of(ASC_NULLS_FIRST),\n ImmutableList...
{ "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...