id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
166515022_223 | {
"fields": [],
"file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/security/TestRaptorSecurityConfig.java",
"identifier": "TestRaptorSecurityConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"raptor.security\", \"read-only\")\n .build();\n\n RaptorSecurityConfig expected = new RaptorSecurityConfig()\n ... | {
"fields": [
{
"declarator": "securitySystem = \"none\"",
"modifier": "private",
"original_string": "private String securitySystem = \"none\";",
"type": "String",
"var_name": "securitySystem"
}
],
"file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/... | {
"body": "@Config(\"raptor.security\")\n public RaptorSecurityConfig setSecuritySystem(String securitySystem)\n {\n this.securitySystem = securitySystem;\n return this;\n }",
"class_method_signature": "RaptorSecurityConfig.setSecuritySystem(String securitySystem)",
"constructor": false,
... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1210 | {
"fields": [
{
"declarator": "executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"-%s\"))",
"modifier": "private",
"original_string": "private ExecutorService executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"-%s\"));",
"type": "... | {
"body": "@Test\n public void testCompareAndSet()\n throws Exception\n {\n StateMachine<State> stateMachine = new StateMachine<>(\"test\", executor, State.BREAKFAST, ImmutableSet.of(State.DINNER));\n assertEquals(stateMachine.get(), State.BREAKFAST);\n\n // no match with new sta... | {
"fields": [
{
"declarator": "log = Logger.get(StateMachine.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(StateMachine.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "name",
"modifi... | {
"body": "public boolean compareAndSet(T expectedState, T newState)\n {\n checkState(!Thread.holdsLock(lock), \"Cannot set state while holding the lock\");\n requireNonNull(expectedState, \"expectedState is null\");\n requireNonNull(newState, \"newState is null\");\n\n FutureStateChang... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_809 | {
"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 testAsin()\n {\n for (double doubleValue : DOUBLE_VALUES) {\n assertFunction(\"asin(\" + doubleValue + \")\", DOUBLE, Math.asin(doubleValue));\n assertFunction(\"asin(REAL '\" + (float) doubleValue + \"')\", DOUBLE, Math.asin((float) doubleValue));\n ... | {
"fields": [
{
"declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()",
"modifier": "public static final",
"original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();",
"type": "SqlScalarFunction",
"var_name": "DECIMAL_MOD_FUNCTION"
... | {
"body": "@Description(\"Arc sine\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double asin(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Math.asin(num);\n }",
"class_method_signature": "MathFunctions.asin(@SqlType(StandardTypes.DOUBLE) double num)",
"const... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_93 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java",
"identifier": "TestProtoUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testColumnNoComment()\n {\n alluxio.grpc.table.FieldSchema.Builder fieldSchema = TestingAlluxioMetastoreObjects.getTestingFieldSchema();\n fieldSchema.clearComment();\n Column column = ProtoUtils.fromProto(fieldSchema.build());\n assertFalse(column.getC... | {
"fields": [],
"file": "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/alluxio/ProtoUtils.java",
"identifier": "ProtoUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProtoUtils.ProtoUtils()",
"constructor": true,
"full_signature": "private ProtoUtils()"... | {
"body": "public static Database fromProto(alluxio.grpc.table.Database db)\n {\n return Database.builder()\n .setDatabaseName(db.getDbName())\n .setLocation(db.hasLocation() ? Optional.of(db.getLocation()) : Optional.empty())\n .setOwnerName(db.getOwnerName())\n... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1181 | {
"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 testAcknowledgementFreesWriters()\n {\n int firstPartition = 0;\n int secondPartition = 1;\n PartitionedOutputBuffer buffer = createPartitionedBuffer(\n createInitialEmptyOutputBuffers(PARTITIONED)\n .withBuffer(FIRST, fir... | {
"fields": [
{
"declarator": "state",
"modifier": "private final",
"original_string": "private final StateMachine<BufferState> state;",
"type": "StateMachine<BufferState>",
"var_name": "state"
},
{
"declarator": "outputBuffers",
"modifier": "private final",
... | {
"body": "@Override\n public ListenableFuture<BufferResult> get(OutputBufferId outputBufferId, long startingSequenceId, DataSize maxSize)\n {\n requireNonNull(outputBufferId, \"outputBufferId is null\");\n checkArgument(maxSize.toBytes() > 0, \"maxSize must be at least 1 byte\");\n\n retur... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_331 | {
"fields": [],
"file": "presto-jdbc/src/test/java/io/prestosql/jdbc/TestPrestoDriverUri.java",
"identifier": "TestPrestoDriverUri",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUriWithSslEnabledPathOnly()\n throws SQLException\n {\n PrestoDriverUri parameters = createDriverUri(\"presto://localhost:8080/blackhole?SSL=true&SSLTrustStorePath=truststore.jks\");\n assertUriPortScheme(parameters, 8080, \"https\");\n\n Proper... | {
"fields": [
{
"declarator": "JDBC_URL_START = \"jdbc:\"",
"modifier": "private static final",
"original_string": "private static final String JDBC_URL_START = \"jdbc:\";",
"type": "String",
"var_name": "JDBC_URL_START"
},
{
"declarator": "QUERY_SPLITTER = Splitter.on(... | {
"body": "public Properties getProperties()\n {\n return properties;\n }",
"class_method_signature": "PrestoDriverUri.getProperties()",
"constructor": false,
"full_signature": "public Properties getProperties()",
"identifier": "getProperties",
"invocations": [],
"modifiers": "public",
"par... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_761 | {
"fields": [
{
"declarator": "TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE)",
"modifier": "private static final",
"original_string": "private static final List<Type> TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE);",
"type": "List<Type>",
"var_name": "TYPES"
}
],
"file": "pr... | {
"body": "@Test\n public void testBufferSmallPages()\n {\n int singlePageRowCount = 10;\n Page page = createSequencePage(TYPES, singlePageRowCount * 2);\n List<Page> splits = splitPage(page, page.getSizeInBytes() / 2);\n\n WorkProcessor<Page> mergePages = mergePages(\n ... | {
"fields": [
{
"declarator": "MAX_MIN_PAGE_SIZE = 1024 * 1024",
"modifier": "private static final",
"original_string": "private static final int MAX_MIN_PAGE_SIZE = 1024 * 1024;",
"type": "int",
"var_name": "MAX_MIN_PAGE_SIZE"
}
],
"file": "presto-main/src/main/java/io/prest... | {
"body": "private MergePages() {}",
"class_method_signature": "MergePages.MergePages()",
"constructor": true,
"full_signature": "private MergePages()",
"identifier": "MergePages",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " MergePages()",
"testcase... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_274 | {
"fields": [],
"file": "presto-iceberg/src/test/java/io/prestosql/plugin/iceberg/TestIcebergTableName.java",
"identifier": "TestIcebergTableName",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFrom()\n {\n assertFrom(\"abc\", \"abc\", TableType.DATA, Optional.empty());\n assertFrom(\"abc@123\", \"abc\", TableType.DATA, Optional.of(123L));\n assertFrom(\"abc$data\", \"abc\", TableType.DATA, Optional.empty());\n assertFrom(\"xyz@456\", \"xy... | {
"fields": [
{
"declarator": "TABLE_PATTERN = Pattern.compile(\"\" +\n \"(?<table>[^$@]+)\" +\n \"(?:@(?<ver1>[0-9]+))?\" +\n \"(?:\\\\$(?<type>[^@]+)(?:@(?<ver2>[0-9]+))?)?\")",
"modifier": "private static final",
"original_string": "private static final Patter... | {
"body": "public static IcebergTableName from(String name)\n {\n Matcher match = TABLE_PATTERN.matcher(name);\n if (!match.matches()) {\n throw new PrestoException(NOT_SUPPORTED, \"Invalid Iceberg table name: \" + name);\n }\n\n String table = match.group(\"table\");\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_624 | {
"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 testDifferentTypes()\n {\n List<Type> types = ImmutableList.of(DOUBLE, VARCHAR, INTEGER);\n MaterializedResult actual = mergeSortedPages(\n types,\n ImmutableList.of(2, 0, 1),\n ImmutableList.of(DESC_NULLS_LAST, DESC_NULLS... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/util/MergeSortedPages.java",
"identifier": "MergeSortedPages",
"interfaces": "",
"methods": [
{
"class_method_signature": "MergeSortedPages.MergeSortedPages()",
"constructor": true,
"full_signature": "private MergeSortedPag... | {
"body": "private MergeSortedPages() {}",
"class_method_signature": "MergeSortedPages.MergeSortedPages()",
"constructor": true,
"full_signature": "private MergeSortedPages()",
"identifier": "MergeSortedPages",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature"... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1247 | {
"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 testBigint()\n {\n assertEquals(getDomain(BIGINT, 0, null), none(BIGINT));\n assertEquals(getDomain(BIGINT, 10, null), all(BIGINT));\n\n assertEquals(getDomain(BIGINT, 0, integerColumnStats(null, null, null)), none(BIGINT));\n assertEquals(getDomain(BIG... | {
"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_448 | {
"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 testMultiply()\n {\n assertEquals(multiply(unscaledDecimal(0), MAX_DECIMAL), unscaledDecimal(0));\n assertEquals(multiply(unscaledDecimal(1), MAX_DECIMAL), MAX_DECIMAL);\n assertEquals(multiply(unscaledDecimal(1), MIN_DECIMAL), MIN_DECIMAL);\n assertEqu... | {
"fields": [
{
"declarator": "NUMBER_OF_LONGS = 2",
"modifier": "private static final",
"original_string": "private static final int NUMBER_OF_LONGS = 2;",
"type": "int",
"var_name": "NUMBER_OF_LONGS"
},
{
"declarator": "NUMBER_OF_INTS = 2 * NUMBER_OF_LONGS",
"mo... | {
"body": "public static Slice multiply(Slice left, Slice right)\n {\n Slice result = unscaledDecimal();\n multiply(left, right, result);\n return result;\n }",
"class_method_signature": "UnscaledDecimal128Arithmetic.multiply(Slice left, Slice right)",
"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_0 | {
"fields": [
{
"declarator": "CLIENT_TYPE_SIGNATURE_CODEC",
"modifier": "public static final",
"original_string": "public static final JsonCodec<ClientTypeSignature> CLIENT_TYPE_SIGNATURE_CODEC;",
"type": "JsonCodec<ClientTypeSignature>",
"var_name": "CLIENT_TYPE_SIGNATURE_CODEC"
... | {
"body": "@Test\n public void testStringSerialization()\n {\n ClientTypeSignature bigint = new ClientTypeSignature(StandardTypes.BIGINT);\n assertEquals(bigint.toString(), \"bigint\");\n ClientTypeSignature varchar = new ClientTypeSignature(StandardTypes.VARCHAR, ImmutableList.of(ClientTyp... | {
"fields": [
{
"declarator": "PATTERN = Pattern.compile(\".*[<>,].*\")",
"modifier": "private static final",
"original_string": "private static final Pattern PATTERN = Pattern.compile(\".*[<>,].*\");",
"type": "Pattern",
"var_name": "PATTERN"
},
{
"declarator": "rawTyp... | {
"body": "@Override\n public String toString()\n {\n if (rawType.equals(ROW)) {\n return rowToString();\n }\n\n if (rawType.equals(VARCHAR) && arguments.get(0).getKind() == ParameterKind.LONG && arguments.get(0).getLongLiteral() == VARCHAR_UNBOUNDED_LENGTH) {\n return... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_349 | {
"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 testGetUdts()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getUDTs(null, null, null, null)) {\n assertFalse(rs.next());\n }\n }\n }",
"c... | {
"fields": [
{
"declarator": "SEARCH_STRING_ESCAPE = \"\\\\\"",
"modifier": "private static final",
"original_string": "private static final String SEARCH_STRING_ESCAPE = \"\\\\\";",
"type": "String",
"var_name": "SEARCH_STRING_ESCAPE"
},
{
"declarator": "connection",
... | {
"body": "@Override\n public ResultSet getUDTs(String catalog, String schemaPattern, String typeNamePattern, int[] types)\n throws SQLException\n {\n return selectEmpty(\"\" +\n \"SELECT TYPE_CAT, TYPE_SCHEM, TYPE_NAME,\\n\" +\n \" CLASS_NAME, DATA_TYPE, REMARKS... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_719 | {
"fields": [
{
"declarator": "VARCHAR_MATCHER = Pattern.compile(\"varchar\\\\(([0-9]+)\\\\)\")",
"modifier": "private static final",
"original_string": "private static final Pattern VARCHAR_MATCHER = Pattern.compile(\"varchar\\\\(([0-9]+)\\\\)\");",
"type": "Pattern",
"var_name": "V... | {
"body": "@Test\n public void test()\n {\n ResolvedFunction resolvedFunction = createResolvedFunction(\"top\", 3);\n ResolvedFunctionDecoder decoder = new ResolvedFunctionDecoder(TestResolvedFunction::varcharTypeLoader);\n Optional<ResolvedFunction> copy = decoder.fromQualifiedName(resolve... | {
"fields": [
{
"declarator": "SERIALIZE_JSON_CODEC = new JsonCodecFactory().jsonCodec(ResolvedFunction.class)",
"modifier": "private static final",
"original_string": "private static final JsonCodec<ResolvedFunction> SERIALIZE_JSON_CODEC = new JsonCodecFactory().jsonCodec(ResolvedFunction.class... | {
"body": "public QualifiedName toQualifiedName()\n {\n byte[] json = SERIALIZE_JSON_CODEC.toJsonBytes(this);\n\n // json can be large so use zstd to compress\n ZstdCompressor compressor = new ZstdCompressor();\n byte[] compressed = new byte[toIntExact(compressor.maxCompressedLength(jso... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1053 | {
"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 testAnalyze()\n {\n analyze(\"ANALYZE t1\");\n analyze(\"ANALYZE t1 WITH (p1 = 'p1')\");\n\n assertFails(\"ANALYZE t1 WITH (p1 = 'p1', p2 = 2, p1 = 'p3')\")\n .hasErrorCode(DUPLICATE_PROPERTY)\n .hasMessageMatching(\".* Duplicate ... | {
"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_1116 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/server/TestEmbeddedDiscoveryConfig.java",
"identifier": "TestEmbeddedDiscoveryConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(EmbeddedDiscoveryConfig.class)\n .setEnabled(false));\n }",
"class_method_signature": "TestEmbeddedDiscoveryConfig.testDefaults()",
"constructor": false,
"full_signature": "@Test public void ... | {
"fields": [
{
"declarator": "enabled",
"modifier": "private",
"original_string": "private boolean enabled;",
"type": "boolean",
"var_name": "enabled"
}
],
"file": "presto-main/src/main/java/io/prestosql/server/EmbeddedDiscoveryConfig.java",
"identifier": "EmbeddedDiscover... | {
"body": "@Config(\"discovery-server.enabled\")\n public EmbeddedDiscoveryConfig setEnabled(boolean enabled)\n {\n this.enabled = enabled;\n return this;\n }",
"class_method_signature": "EmbeddedDiscoveryConfig.setEnabled(boolean enabled)",
"constructor": false,
"full_signature": "@Confi... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_53 | {
"fields": [
{
"declarator": "tester = new JsonFieldDecoderTester(\"rfc2822\")",
"modifier": "private",
"original_string": "private JsonFieldDecoderTester tester = new JsonFieldDecoderTester(\"rfc2822\");",
"type": "JsonFieldDecoderTester",
"var_name": "tester"
}
],
"file": ... | {
"body": "@Test\n public void testDecode()\n {\n tester.assertDecodedAs(\"\\\"Fri Feb 09 13:15:19 Z 2018\\\"\", TIMESTAMP_MILLIS, 1_518_182_119_000_000L);\n tester.assertDecodedAs(\"\\\"Fri Feb 09 13:15:19 Z 2018\\\"\", TIMESTAMP_WITH_TIME_ZONE, packDateTimeWithZone(1518182119000L, UTC_KEY));\n ... | {
"fields": [
{
"declarator": "SUPPORTED_TYPES = ImmutableSet.of(TIMESTAMP_MILLIS, TIMESTAMP_WITH_TIME_ZONE)",
"modifier": "private static final",
"original_string": "private static final Set<Type> SUPPORTED_TYPES = ImmutableSet.of(TIMESTAMP_MILLIS, TIMESTAMP_WITH_TIME_ZONE);",
"type": "Se... | {
"body": "@Override\n public FieldValueProvider decode(JsonNode value)\n {\n return new RFC2822JsonValueProvider(value, columnHandle);\n }",
"class_method_signature": "RFC2822JsonFieldDecoder.decode(JsonNode value)",
"constructor": false,
"full_signature": "@Override public FieldValueProvider d... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_826 | {
"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 testNaN()\n {\n assertFunction(\"nan()\", DOUBLE, Double.NaN);\n assertFunction(\"0.0E0 / 0.0E0\", DOUBLE, Double.NaN);\n }",
"class_method_signature": "TestMathFunctions.testNaN()",
"constructor": false,
"full_signature": "@Test public void testNaN()",
"i... | {
"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(\"Constant representing not-a-number\")\n @ScalarFunction(\"nan\")\n @SqlType(StandardTypes.DOUBLE)\n public static double NaN()\n {\n return Double.NaN;\n }",
"class_method_signature": "MathFunctions.NaN()",
"constructor": false,
"full_signature": "@Description(\"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_575 | {
"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 testRetryOnWrappedAndReturn()\n throws Exception\n {\n MockConnectorFactory mock = new MockConnectorFactory(THROW_WRAPPED_SQL_RECOVERABLE_EXCEPTION, RETURN);\n ConnectionFactory factory = new RetryingConnectionFactory(mock);\n assertNotNull(factory.... | {
"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_125 | {
"fields": [
{
"declarator": "HTTP_RANGE_NOT_SATISFIABLE = 416",
"modifier": "private static final",
"original_string": "private static final int HTTP_RANGE_NOT_SATISFIABLE = 416;",
"type": "int",
"var_name": "HTTP_RANGE_NOT_SATISFIABLE"
}
],
"file": "presto-hive/src/test/ja... | {
"body": "@Test\n public void testAssumeRoleDefaultCredentials()\n throws Exception\n {\n Configuration config = new Configuration(false);\n config.set(S3_IAM_ROLE, \"test_role\");\n\n try (PrestoS3FileSystem fs = new PrestoS3FileSystem()) {\n fs.initialize(new URI(\"... | {
"fields": [
{
"declarator": "S3_USER_AGENT_SUFFIX = \"presto\"",
"modifier": "public static final",
"original_string": "public static final String S3_USER_AGENT_SUFFIX = \"presto\";",
"type": "String",
"var_name": "S3_USER_AGENT_SUFFIX"
},
{
"declarator": "S3_USER_AGE... | {
"body": "@Override\n public void initialize(URI uri, Configuration conf)\n throws IOException\n {\n requireNonNull(uri, \"uri is null\");\n requireNonNull(conf, \"conf is null\");\n super.initialize(uri, conf);\n setConf(conf);\n\n try {\n this.uri = ne... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_430 | {
"fields": [],
"file": "presto-spi/src/test/java/io/prestosql/spi/TestPage.java",
"identifier": "TestPage",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testGetPositions()\n {\n int entries = 10;\n BlockBuilder blockBuilder = BIGINT.createBlockBuilder(null, entries);\n for (int i = 0; i < entries; i++) {\n BIGINT.writeLong(blockBuilder, i);\n }\n Block block = blockBuilder.build();\n\n... | {
"fields": [
{
"declarator": "INSTANCE_SIZE = ClassLayout.parseClass(Page.class).instanceSize()",
"modifier": "public static final",
"original_string": "public static final int INSTANCE_SIZE = ClassLayout.parseClass(Page.class).instanceSize();",
"type": "int",
"var_name": "INSTANCE_... | {
"body": "public Page getPositions(int[] retainedPositions, int offset, int length)\n {\n requireNonNull(retainedPositions, \"retainedPositions is null\");\n\n Block[] blocks = new Block[this.blocks.length];\n for (int i = 0; i < blocks.length; i++) {\n blocks[i] = this.blocks[i].g... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_963 | {
"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 testJoinOrderWithMultipleEdgesBetweenNodes()\n {\n PlanNode plan =\n joinNode(\n joinNode(\n values(\"a\"),\n values(\"b1\", \"b2\")),\n values(\"c1\",... | {
"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_1004 | {
"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 testVarchar()\n {\n List<RowExpression> values = new ArrayList<>();\n values.add(constant(Slices.utf8Slice(\"1\"), DOUBLE));\n values.add(constant(Slices.utf8Slice(\"2\"), DOUBLE));\n values.add(constant(Slices.utf8Slice(\"3\"), DOUBLE));\n asser... | {
"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_1141 | {
"fields": [
{
"declarator": "SQL_PARSER = new SqlParser()",
"modifier": "private static final",
"original_string": "private static final SqlParser SQL_PARSER = new SqlParser();",
"type": "SqlParser",
"var_name": "SQL_PARSER"
},
{
"declarator": "QUERY_PREPARER = new Qu... | {
"body": "@Test\n public void testExecuteStatementDoesNotExist()\n {\n assertPrestoExceptionThrownBy(() -> QUERY_PREPARER.prepareQuery(TEST_SESSION, \"execute my_query\"))\n .hasErrorCode(NOT_FOUND);\n }",
"class_method_signature": "TestQueryPreparer.testExecuteStatementDoesNotExist(... | {
"fields": [
{
"declarator": "sqlParser",
"modifier": "private final",
"original_string": "private final SqlParser sqlParser;",
"type": "SqlParser",
"var_name": "sqlParser"
}
],
"file": "presto-main/src/main/java/io/prestosql/execution/QueryPreparer.java",
"identifier": "Q... | {
"body": "public PreparedQuery prepareQuery(Session session, String query)\n throws ParsingException, PrestoException\n {\n Statement wrappedStatement = sqlParser.createStatement(query, createParsingOptions(session));\n return prepareQuery(session, wrappedStatement);\n }",
"class_met... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_488 | {
"fields": [
{
"declarator": "A = new TestingColumnHandle(\"a\")",
"modifier": "private static final",
"original_string": "private static final ColumnHandle A = new TestingColumnHandle(\"a\");",
"type": "ColumnHandle",
"var_name": "A"
},
{
"declarator": "B = new Testin... | {
"body": "@Test\n public void testExtractFixedValues()\n {\n assertEquals(\n TupleDomain.extractFixedValues(TupleDomain.withColumnDomains(\n ImmutableMap.<ColumnHandle, Domain>builder()\n .put(A, Domain.all(DOUBLE))\n ... | {
"fields": [
{
"declarator": "NONE = new TupleDomain<>(Optional.empty())",
"modifier": "private static final",
"original_string": "private static final TupleDomain<?> NONE = new TupleDomain<>(Optional.empty());",
"type": "TupleDomain<?>",
"var_name": "NONE"
},
{
"decla... | {
"body": "public static <T> Optional<Map<T, NullableValue>> extractFixedValues(TupleDomain<T> tupleDomain)\n {\n if (tupleDomain.getDomains().isEmpty()) {\n return Optional.empty();\n }\n\n return Optional.of(tupleDomain.getDomains().get()\n .entrySet().stream()\n ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_172 | {
"fields": [
{
"declarator": "LAZY_SERDE_CLASS_NAME = LazySimpleSerDe.class.getName()",
"modifier": "private static final",
"original_string": "private static final String LAZY_SERDE_CLASS_NAME = LazySimpleSerDe.class.getName();",
"type": "String",
"var_name": "LAZY_SERDE_CLASS_NAME... | {
"body": "@Test(expectedExceptions = NullPointerException.class)\n public void shouldThrowNullPointerExceptionWhenColumnsIsNull()\n {\n updateSplitSchema(new Properties(), null);\n }",
"class_method_signature": "TestS3SelectRecordCursor.shouldThrowNullPointerExceptionWhenColumnsIsNull()",
"constr... | {
"fields": [
{
"declarator": "THRIFT_STRUCT = \"struct\"",
"modifier": "private static final",
"original_string": "private static final String THRIFT_STRUCT = \"struct\";",
"type": "String",
"var_name": "THRIFT_STRUCT"
},
{
"declarator": "START_STRUCT = \"{\"",
"... | {
"body": "@VisibleForTesting\n static Properties updateSplitSchema(Properties splitSchema, List<HiveColumnHandle> columns)\n {\n requireNonNull(splitSchema, \"splitSchema is null\");\n requireNonNull(columns, \"columns is null\");\n // clone split properties for update so as not to affect ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_522 | {
"fields": [],
"file": "presto-cli/src/test/java/io/prestosql/cli/TestVerticalRecordPrinter.java",
"identifier": "TestVerticalRecordPrinter",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testVerticalPrintingNoRows()\n throws Exception\n {\n StringWriter writer = new StringWriter();\n List<String> fieldNames = ImmutableList.of(\"none\");\n OutputPrinter printer = new VerticalRecordPrinter(fieldNames, writer);\n\n printer.finis... | {
"fields": [
{
"declarator": "LINE_SPLITTER = Splitter.on('\\n')",
"modifier": "private static final",
"original_string": "private static final Splitter LINE_SPLITTER = Splitter.on('\\n');",
"type": "Splitter",
"var_name": "LINE_SPLITTER"
},
{
"declarator": "fieldNames... | {
"body": "@Override\n public void finish()\n throws IOException\n {\n if (rowCount == 0) {\n writer.append(\"(no rows)\\n\");\n }\n writer.flush();\n }",
"class_method_signature": "VerticalRecordPrinter.finish()",
"constructor": false,
"full_signature": "@Ove... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1268 | {
"fields": [],
"file": "presto-bigquery/src/test/java/io/prestosql/plugin/bigquery/TestReadRowsHelper.java",
"identifier": "TestReadRowsHelper",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n void testNoFailures()\n {\n BigQueryStorageClient client = mock(BigQueryStorageClient.class);\n ReadRowsRequest.Builder request = newRequest();\n\n MockResponsesBatch batch1 = new MockResponsesBatch();\n batch1.addResponse(ReadRowsResponse.newBuilder().setRowCount(... | {
"fields": [
{
"declarator": "client",
"modifier": "private final",
"original_string": "private final BigQueryStorageClient client;",
"type": "BigQueryStorageClient",
"var_name": "client"
},
{
"declarator": "request",
"modifier": "private final",
"original_... | {
"body": "public Iterator<ReadRowsResponse> readRows()\n {\n Iterator<ReadRowsResponse> serverResponses = fetchResponses(request);\n return new ReadRowsIterator(this, request.getReadPositionBuilder(), serverResponses);\n }",
"class_method_signature": "ReadRowsHelper.readRows()",
"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_871 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java",
"identifier": "TestStringFunctions",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testRightTrim()\n {\n assertFunction(\"RTRIM('')\", createVarcharType(0), \"\");\n assertFunction(\"RTRIM(' ')\", createVarcharType(3), \"\");\n assertFunction(\"RTRIM(' hello ')\", createVarcharType(9), \" hello\");\n assertFunction(\"RTRIM(' hel... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java",
"identifier": "StringFunctions",
"interfaces": "",
"methods": [
{
"class_method_signature": "StringFunctions.StringFunctions()",
"constructor": true,
"full_signature": "private StringF... | {
"body": "@Description(\"Removes whitespace from the end of a string\")\n @ScalarFunction(\"rtrim\")\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice rightTrim(@SqlType(\"varchar(x)\") Slice slice)\n {\n return SliceUtf8.rightTrim(slice);\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_934 | {
"fields": [
{
"declarator": "idAllocator = new PlanNodeIdAllocator()",
"modifier": "private final",
"original_string": "private final PlanNodeIdAllocator idAllocator = new PlanNodeIdAllocator();",
"type": "PlanNodeIdAllocator",
"var_name": "idAllocator"
},
{
"declarat... | {
"body": "@Test\n public void testValidateSuccessful()\n {\n // random seemingly valid plan\n PlanNode root =\n new OutputNode(idAllocator.getNextId(),\n new ProjectNode(idAllocator.getNextId(),\n new ValuesNode(\n ... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/sql/planner/sanity/VerifyOnlyOneOutputNode.java",
"identifier": "VerifyOnlyOneOutputNode",
"interfaces": "implements PlanSanityChecker.Checker",
"methods": [
{
"class_method_signature": "VerifyOnlyOneOutputNode.validate(PlanNode plan,\n... | {
"body": "@Override\n public void validate(PlanNode plan,\n Session session,\n Metadata metadata,\n TypeOperators typeOperators,\n TypeAnalyzer typeAnalyzer,\n TypeProvider types,\n WarningCollector warningCollector)\n {\n int outputPlanN... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_467 | {
"fields": [],
"file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestSortedRangeSet.java",
"identifier": "TestSortedRangeSet",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntersect()\n {\n assertEquals(\n SortedRangeSet.none(BIGINT).intersect(\n SortedRangeSet.none(BIGINT)),\n SortedRangeSet.none(BIGINT));\n\n assertEquals(\n SortedRangeSet.all(BIGINT).intersect(\... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final Type type;",
"type": "Type",
"var_name": "type"
},
{
"declarator": "lowIndexedRanges",
"modifier": "private final",
"original_string": "private final Navigab... | {
"body": "@Override\n public SortedRangeSet intersect(ValueSet other)\n {\n SortedRangeSet otherRangeSet = checkCompatibility(other);\n\n Builder builder = new Builder(type);\n\n Iterator<Range> iterator1 = lowIndexedRanges.values().iterator();\n Iterator<Range> iterator2 = otherRan... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_308 | {
"fields": [
{
"declarator": "TOLERANCE = 0.01",
"modifier": "private static final",
"original_string": "private static final double TOLERANCE = 0.01;",
"type": "double",
"var_name": "TOLERANCE"
},
{
"declarator": "SUPPORTED_SCHEMAS = ImmutableList.of(\"tiny\", \"sf1\"... | {
"body": "@Test\n public void testTableStats()\n {\n SUPPORTED_SCHEMAS.forEach(schema -> {\n double scaleFactor = TpchMetadata.schemaNameToScaleFactor(schema);\n testTableStats(schema, REGION, 5);\n testTableStats(schema, NATION, 25);\n testTableStats(schema, ... | {
"fields": [
{
"declarator": "TINY_SCHEMA_NAME = \"tiny\"",
"modifier": "public static final",
"original_string": "public static final String TINY_SCHEMA_NAME = \"tiny\";",
"type": "String",
"var_name": "TINY_SCHEMA_NAME"
},
{
"declarator": "TINY_SCALE_FACTOR = 0.01",
... | {
"body": "public static double schemaNameToScaleFactor(String schemaName)\n {\n if (TINY_SCHEMA_NAME.equals(schemaName)) {\n return TINY_SCALE_FACTOR;\n }\n\n if (!schemaName.startsWith(\"sf\")) {\n return -1;\n }\n\n try {\n return Double.parseD... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_758 | {
"fields": [
{
"declarator": "TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE)",
"modifier": "private static final",
"original_string": "private static final List<Type> TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE);",
"type": "List<Type>",
"var_name": "TYPES"
}
],
"file": "pr... | {
"body": "@Test\n public void testMinPageSizeThreshold()\n {\n Page page = createSequencePage(TYPES, 10);\n\n WorkProcessor<Page> mergePages = mergePages(\n TYPES,\n page.getSizeInBytes(),\n Integer.MAX_VALUE,\n Integer.MAX_VALUE,\n ... | {
"fields": [
{
"declarator": "MAX_MIN_PAGE_SIZE = 1024 * 1024",
"modifier": "private static final",
"original_string": "private static final int MAX_MIN_PAGE_SIZE = 1024 * 1024;",
"type": "int",
"var_name": "MAX_MIN_PAGE_SIZE"
}
],
"file": "presto-main/src/main/java/io/prest... | {
"body": "private MergePages() {}",
"class_method_signature": "MergePages.MergePages()",
"constructor": true,
"full_signature": "private MergePages()",
"identifier": "MergePages",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " MergePages()",
"testcase... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1012 | {
"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 testScalarSubQuery()\n {\n analyze(\"SELECT 'a', (VALUES 1) GROUP BY 1\");\n analyze(\"SELECT 'a', (SELECT (1))\");\n analyze(\"SELECT * FROM t1 WHERE (VALUES 1) = 2\");\n analyze(\"SELECT * FROM t1 WHERE (VALUES 1) IN (VALUES 1)\");\n analyze(\"... | {
"fields": [
{
"declarator": "metadata",
"modifier": "private final",
"original_string": "private final Metadata metadata;",
"type": "Metadata",
"var_name": "metadata"
},
{
"declarator": "sqlParser",
"modifier": "private final",
"original_string": "private ... | {
"body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }",
"class_method_signature": "Analyzer.analyze(Statement statement)",
"constructor": false,
"full_signature": "public Analysis analyze(Statement statement)",
"identifier": "analyze",
"invocations"... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1157 | {
"fields": [
{
"declarator": "idGeneator = new AtomicInteger()",
"modifier": "private final",
"original_string": "private final AtomicInteger idGeneator = new AtomicInteger();",
"type": "AtomicInteger",
"var_name": "idGeneator"
},
{
"declarator": "session = TestingSess... | {
"body": "@Test\n public void testCountAlreadyRevokedMemoryWithinAPool()\n throws Exception\n {\n // Given\n SqlTask sqlTask1 = newSqlTask();\n MemoryPool anotherMemoryPool = new MemoryPool(new MemoryPoolId(\"test\"), DataSize.ofBytes(10));\n sqlTask1.getQueryContext().se... | {
"fields": [
{
"declarator": "log = Logger.get(MemoryRevokingScheduler.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(MemoryRevokingScheduler.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator":... | {
"body": "private void requestMemoryRevoking(MemoryPool memoryPool, Collection<SqlTask> sqlTasks)\n {\n long remainingBytesToRevoke = (long) (-memoryPool.getFreeBytes() + (memoryPool.getMaxBytes() * (1.0 - memoryRevokingTarget)));\n remainingBytesToRevoke -= getMemoryAlreadyBeingRevoked(sqlTasks, me... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_867 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java",
"identifier": "TestStringFunctions",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testSplit()\n {\n assertFunction(\"SPLIT('a.b.c', '.')\", new ArrayType(createVarcharType(5)), ImmutableList.of(\"a\", \"b\", \"c\"));\n\n assertFunction(\"SPLIT('ab', '.', 1)\", new ArrayType(createVarcharType(2)), ImmutableList.of(\"ab\"));\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": "@ScalarFunction\n @LiteralParameters({\"x\", \"y\"})\n @SqlType(\"array(varchar(x))\")\n public static Block split(@SqlType(\"varchar(x)\") Slice string, @SqlType(\"varchar(y)\") Slice delimiter)\n {\n return split(string, delimiter, string.length() + 1);\n }",
"class_method_signatu... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_12 | {
"fields": [],
"file": "presto-session-property-managers/src/test/java/io/prestosql/plugin/session/file/TestFileSessionPropertyManagerConfig.java",
"identifier": "TestFileSessionPropertyManagerConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(FileSessionPropertyManagerConfig.class)\n .setConfigFile(null));\n }",
"class_method_signature": "TestFileSessionPropertyManagerConfig.testDefaults()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "configFile",
"modifier": "private",
"original_string": "private File configFile;",
"type": "File",
"var_name": "configFile"
}
],
"file": "presto-session-property-managers/src/main/java/io/prestosql/plugin/session/file/FileSessionPropertyManagerC... | {
"body": "@Config(\"session-property-manager.config-file\")\n public FileSessionPropertyManagerConfig setConfigFile(File configFile)\n {\n this.configFile = configFile;\n return this;\n }",
"class_method_signature": "FileSessionPropertyManagerConfig.setConfigFile(File configFile)",
"constr... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_534 | {
"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 testExpansion()\n {\n ResourceGroupIdTemplate template = new ResourceGroupIdTemplate(\"test.${USER}.${SOURCE}\");\n ResourceGroupId expected = new ResourceGroupId(new ResourceGroupId(new ResourceGroupId(\"test\"), \"u\"), \"s\");\n assertEquals(template.expand... | {
"fields": [
{
"declarator": "segments",
"modifier": "private final",
"original_string": "private final List<ResourceGroupNameTemplate> segments;",
"type": "List<ResourceGroupNameTemplate>",
"var_name": "segments"
}
],
"file": "presto-resource-group-managers/src/main/java/io... | {
"body": "public ResourceGroupId expandTemplate(VariableMap context)\n {\n ResourceGroupId id = null;\n for (ResourceGroupNameTemplate segment : segments) {\n String expanded = segment.expandTemplate(context);\n if (id == null) {\n id = new ResourceGroupId(expand... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_164 | {
"fields": [
{
"declarator": "partitionDirectory",
"modifier": "private",
"original_string": "private Path partitionDirectory;",
"type": "Path",
"var_name": "partitionDirectory"
},
{
"declarator": "rowIdBlock",
"modifier": "private",
"original_string": "pri... | {
"body": "@Test\n public void testDeleteLocations()\n {\n AcidInfo.Builder acidInfoBuilder = AcidInfo.builder(partitionDirectory);\n addDeleteDelta(acidInfoBuilder, 4L, 4L, OptionalInt.of(0), partitionDirectory);\n addDeleteDelta(acidInfoBuilder, 7L, 7L, OptionalInt.of(0), partitionDirecto... | {
"fields": [
{
"declarator": "ORIGINAL_TRANSACTION_INDEX = 0",
"modifier": "private static final",
"original_string": "private static final int ORIGINAL_TRANSACTION_INDEX = 0;",
"type": "int",
"var_name": "ORIGINAL_TRANSACTION_INDEX"
},
{
"declarator": "ROW_ID_INDEX = ... | {
"body": "public MaskDeletedRowsFunction getMaskDeletedRowsFunction(Page sourcePage, OptionalLong startRowId)\n {\n return new MaskDeletedRows(sourcePage, startRowId);\n }",
"class_method_signature": "OrcDeletedRows.getMaskDeletedRowsFunction(Page sourcePage, OptionalLong startRowId)",
"constructor"... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_471 | {
"fields": [],
"file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestEquatableValueSet.java",
"identifier": "TestEquatableValueSet",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testIntersect()\n {\n assertEquals(EquatableValueSet.none(ID).intersect(EquatableValueSet.none(ID)), EquatableValueSet.none(ID));\n assertEquals(EquatableValueSet.all(ID).intersect(EquatableValueSet.all(ID)), EquatableValueSet.all(ID));\n assertEquals(Equatabl... | {
"fields": [
{
"declarator": "type",
"modifier": "private final",
"original_string": "private final Type type;",
"type": "Type",
"var_name": "type"
},
{
"declarator": "inclusive",
"modifier": "private final",
"original_string": "private final boolean inclus... | {
"body": "@Override\n public EquatableValueSet intersect(ValueSet other)\n {\n EquatableValueSet otherValueSet = checkCompatibility(other);\n\n if (inclusive && otherValueSet.inclusive()) {\n return new EquatableValueSet(type, true, intersect(entries, otherValueSet.entries));\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_888 | {
"fields": [
{
"declarator": "assertions",
"modifier": "private",
"original_string": "private QueryAssertions assertions;",
"type": "QueryAssertions",
"var_name": "assertions"
}
],
"file": "presto-main/src/test/java/io/prestosql/operator/scalar/timestamptz/TestAtTimeZone.jav... | {
"body": "@Test\n public void testAtTimeZone()\n {\n assertThat(assertions.expression(\"at_timezone(TIMESTAMP '2020-05-01 12:34:56 +07:09', 'America/Los_Angeles')\")).matches(\"TIMESTAMP '2020-04-30 22:25:56 America/Los_Angeles'\");\n assertThat(assertions.expression(\"at_timezone(TIMESTAMP '2020... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/operator/scalar/timestamptz/AtTimeZone.java",
"identifier": "AtTimeZone",
"interfaces": "",
"methods": [
{
"class_method_signature": "AtTimeZone.AtTimeZone()",
"constructor": true,
"full_signature": "private AtTimeZone()",
... | {
"body": "private AtTimeZone() {}",
"class_method_signature": "AtTimeZone.AtTimeZone()",
"constructor": true,
"full_signature": "private AtTimeZone()",
"identifier": "AtTimeZone",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " AtTimeZone()",
"testcase... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_922 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/sql/planner/TestSymbolAllocator.java",
"identifier": "TestSymbolAllocator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnique()\n {\n SymbolAllocator allocator = new SymbolAllocator();\n Set<Symbol> symbols = ImmutableSet.<Symbol>builder()\n .add(allocator.newSymbol(\"foo_1_0\", BigintType.BIGINT))\n .add(allocator.newSymbol(\"foo\", BigintType.BIGIN... | {
"fields": [
{
"declarator": "symbols",
"modifier": "private final",
"original_string": "private final Map<Symbol, Type> symbols;",
"type": "Map<Symbol, Type>",
"var_name": "symbols"
},
{
"declarator": "nextId",
"modifier": "private",
"original_string": "pr... | {
"body": "public Symbol newSymbol(Symbol symbolHint)\n {\n return newSymbol(symbolHint, null);\n }",
"class_method_signature": "SymbolAllocator.newSymbol(Symbol symbolHint)",
"constructor": false,
"full_signature": "public Symbol newSymbol(Symbol symbolHint)",
"identifier": "newSymbol",
"invoc... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1045 | {
"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 testRecursiveReferenceShadowing()\n {\n // table 't' in subquery refers to WITH-query defined in subquery, so it is not a recursive reference to 't' in the top-level WITH-list\n assertFails(\"WITH RECURSIVE t(n) AS (\" +\n \" SELECT 1\" +\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_1100 | {
"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 = VerifyException.class, expectedExceptionsMessageRegExp = \"data present without columns and types\")\n public void shouldThrowWhenDataIsPresentWithoutColumns()\n {\n List<Page> pages = rowPagesBuilder(ImmutableList.of(IntegerType.INTEGER, BooleanType.BOOLEAN))\n ... | {
"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_133 | {
"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 testCalculateAverageRowsPerPartition()\n {\n assertThat(calculateAverageRowsPerPartition(ImmutableList.of())).isEmpty();\n assertThat(calculateAverageRowsPerPartition(ImmutableList.of(PartitionStatistics.empty()))).isEmpty();\n assertThat(calculateAverageRowsP... | {
"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 OptionalDouble calculateAverageRowsPerPartition(Collection<PartitionStatistics> statistics)\n {\n return statistics.stream()\n .map(PartitionStatistics::getBasicStatistics)\n .map(HiveBasicStatistics::getRowCount)\n .filt... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_563 | {
"fields": [
{
"declarator": "tokenRing = Murmur3PartitionerTokenRing.INSTANCE",
"modifier": "private static final",
"original_string": "private static final Murmur3PartitionerTokenRing tokenRing = Murmur3PartitionerTokenRing.INSTANCE;",
"type": "Murmur3PartitionerTokenRing",
"var_n... | {
"body": "@Test\n public void testGetRingFraction()\n {\n assertEquals(tokenRing.getRingFraction(\"1\", \"1\"), 0.0, 0.001);\n assertEquals(tokenRing.getRingFraction(\"1\", \"0\"), 1.0, 0.001);\n assertEquals(tokenRing.getRingFraction(\"0\", Long.toString(Long.MAX_VALUE)), 0.5, 0.001);\n ... | {
"fields": [
{
"declarator": "INSTANCE = new Murmur3PartitionerTokenRing()",
"modifier": "public static final",
"original_string": "public static final Murmur3PartitionerTokenRing INSTANCE = new Murmur3PartitionerTokenRing();",
"type": "Murmur3PartitionerTokenRing",
"var_name": "INS... | {
"body": "@Override\n public double getRingFraction(String start, String end)\n {\n return getTokenCountInRange(start, end).doubleValue() / TOTAL_TOKEN_COUNT.doubleValue();\n }",
"class_method_signature": "Murmur3PartitionerTokenRing.getRingFraction(String start, String end)",
"constructor": fals... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1229 | {
"fields": [
{
"declarator": "executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"executor-%s\"))",
"modifier": "private",
"original_string": "private ExecutorService executor = newCachedThreadPool(daemonThreadsNamed(getClass().getSimpleName() + \"executor-%s\"));",... | {
"body": "@Test\n public void testMultipleNodes()\n {\n FixedCountScheduler nodeScheduler = new FixedCountScheduler(\n (node, partition, totalPartitions) -> Optional.of(taskFactory.createTableScanTask(\n new TaskId(\"test\", 1, 1),\n node, Imm... | {
"fields": [
{
"declarator": "taskScheduler",
"modifier": "private final",
"original_string": "private final TaskScheduler taskScheduler;",
"type": "TaskScheduler",
"var_name": "taskScheduler"
},
{
"declarator": "partitionToNode",
"modifier": "private final",
... | {
"body": "@Override\n public ScheduleResult schedule()\n {\n OptionalInt totalPartitions = OptionalInt.of(partitionToNode.size());\n List<RemoteTask> newTasks = IntStream.range(0, partitionToNode.size())\n .mapToObj(partition -> taskScheduler.scheduleTask(partitionToNode.get(partit... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_830 | {
"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 testIsNaN()\n {\n assertFunction(\"is_nan(0.0E0 / 0.0E0)\", BOOLEAN, true);\n assertFunction(\"is_nan(0.0E0 / 1.0E0)\", BOOLEAN, false);\n assertFunction(\"is_nan(infinity() / infinity())\", BOOLEAN, true);\n assertFunction(\"is_nan(nan())\", BOOLEAN, t... | {
"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(\"Test if value is not-a-number\")\n @ScalarFunction(\"is_nan\")\n @SqlType(StandardTypes.BOOLEAN)\n public static boolean isNaN(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Double.isNaN(num);\n }",
"class_method_signature": "MathFunctions.isNaN(@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_45 | {
"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 testSchemaRulesForCheckCanShowTables()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-visibility.json\");\n\n accessControl.checkCanShowTables(ADMIN, new CatalogSchemaName(\"specific-catalog\", \"specific-schema\"... | {
"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 checkCanShowTables(SystemSecurityContext context, CatalogSchemaName schema)\n {\n if (!checkAnySchemaAccess(context, schema.getCatalogName(), schema.getSchemaName())) {\n denyShowTables(schema.toString());\n }\n }",
"class_method_signature": "File... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_975 | {
"fields": [
{
"declarator": "fortyIntegers = ImmutableList.of(\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,\n 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40)",
"modifier": "private static final",
"or... | {
"body": "@Test\n public void testGroupingOperationAllBitsSet()\n {\n List<Integer> groupingOrdinals = ImmutableList.of(0, 4, 8);\n List<Set<Integer>> groupingSetOrdinals = ImmutableList.of(ImmutableSet.of(1), ImmutableSet.of(7, 3, 1), ImmutableSet.of(9, 1));\n\n for (Set<Integer> grouping... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/sql/planner/GroupingOperationRewriter.java",
"identifier": "GroupingOperationRewriter",
"interfaces": "",
"methods": [
{
"class_method_signature": "GroupingOperationRewriter.GroupingOperationRewriter()",
"constructor": true,
... | {
"body": "static long calculateGrouping(Set<Integer> groupingSet, List<Integer> columns)\n {\n long grouping = (1L << columns.size()) - 1;\n\n for (int index = 0; index < columns.size(); index++) {\n int column = columns.get(index);\n\n if (groupingSet.contains(column)) {\n ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_426 | {
"fields": [],
"file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestEncodedPolylineFunctions.java",
"identifier": "TestEncodedPolylineFunctions",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testToEncodedPolyline()\n {\n assertToEncodedPolyline(\"LINESTRING EMPTY\", \"\");\n assertToEncodedPolyline(\"LINESTRING (-120.2 38.5, -120.95 40.7, -126.453 43.252)\", \"_p~iF~ps|U_ulLnnqC_mqNvxq`@\");\n assertToEncodedPolyline(\"LINESTRING (-120.2 38.5, -12... | {
"fields": [],
"file": "presto-geospatial/src/main/java/io/prestosql/plugin/geospatial/EncodedPolylineFunctions.java",
"identifier": "EncodedPolylineFunctions",
"interfaces": "",
"methods": [
{
"class_method_signature": "EncodedPolylineFunctions.EncodedPolylineFunctions()",
"constructor": tru... | {
"body": "@Description(\"Encodes a linestring or multipoint geometry to a polyline\")\n @ScalarFunction(\"to_encoded_polyline\")\n @SqlType(StandardTypes.VARCHAR)\n public static Slice toEncodedPolyline(@SqlType(GEOMETRY_TYPE_NAME) Slice input)\n {\n OGCGeometry geometry = deserialize(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_631 | {
"fields": [
{
"declarator": "blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde()",
"modifier": "private final",
"original_string": "private final BlockEncodingSerde blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde();",
"type": "BlockEncodingSerd... | {
"body": "@Test\n public void testCleanupOldSpillFiles()\n throws Exception\n {\n List<Path> spillPaths = ImmutableList.of(spillPath1.toPath(), spillPath2.toPath());\n spillPath1.mkdirs();\n spillPath2.mkdirs();\n\n java.nio.file.Files.createTempFile(spillPath1.toPath(), ... | {
"fields": [
{
"declarator": "log = Logger.get(FileSingleStreamSpillerFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(FileSingleStreamSpillerFactory.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@PostConstruct\n public void cleanupOldSpillFiles()\n {\n spillPaths.forEach(FileSingleStreamSpillerFactory::cleanupOldSpillFiles);\n }",
"class_method_signature": "FileSingleStreamSpillerFactory.cleanupOldSpillFiles()",
"constructor": false,
"full_signature": "@PostConstruct public 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_261 | {
"fields": [],
"file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/storage/organization/TestTuple.java",
"identifier": "TestTuple",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testComparableTuple()\n {\n List<Type> types = ImmutableList.of(BIGINT, VARCHAR, BOOLEAN, DOUBLE, DATE, TIMESTAMP_MILLIS);\n\n Tuple tuple1 = new Tuple(types, ImmutableList.of(1L, \"hello\", false, 1.2d, 11111, 1112));\n Tuple equalToTuple1 = new Tuple(types, ... | {
"fields": [
{
"declarator": "types",
"modifier": "private final",
"original_string": "private final List<Type> types;",
"type": "List<Type>",
"var_name": "types"
},
{
"declarator": "values",
"modifier": "private final",
"original_string": "private final Li... | {
"body": "@Override\n public int compareTo(Tuple o)\n {\n checkArgument(o.getTypes().size() == types.size(), \"types must be of same size\");\n for (int i = 0; i < types.size(); i++) {\n checkArgument(o.getTypes().get(i).equals(types.get(i)), \"types must be the same\");\n }\n\n... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1194 | {
"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 testAcknowledgementFreesWriters()\n {\n BroadcastOutputBuffer buffer = createBroadcastBuffer(\n createInitialEmptyOutputBuffers(BROADCAST)\n .withBuffer(FIRST, BROADCAST_PARTITION_ID)\n .withBuffer(SECOND, BROADCA... | {
"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 ListenableFuture<BufferResult> get(OutputBufferId outputBufferId, long startingSequenceId, DataSize maxSize)\n {\n checkState(!Thread.holdsLock(this), \"Cannot get pages while holding a lock on this\");\n requireNonNull(outputBufferId, \"outputBufferId is null\");\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_774 | {
"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 testProbeAndBuildNulls(boolean hashEnabled)\n {\n DriverContext driverContext = taskContext.addPipelineContext(0, true, true, false).addDriverContext();\n\n // build\n OperatorContext operatorContext = driverContext.addOpe... | {
"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_324 | {
"fields": [
{
"declarator": "exampleTable = new ExampleTable(\"tableName\",\n ImmutableList.of(new ExampleColumn(\"a\", createUnboundedVarcharType()), new ExampleColumn(\"b\", BIGINT)),\n ImmutableList.of(URI.create(\"file://table-1.json\"), URI.create(\"file://table-2.json\")))",
... | {
"body": "@Test\n public void testColumnMetadata()\n {\n assertEquals(exampleTable.getColumnsMetadata(), ImmutableList.of(\n new ColumnMetadata(\"a\", createUnboundedVarcharType()),\n new ColumnMetadata(\"b\", BIGINT)));\n }",
"class_method_signature": "TestExampleTabl... | {
"fields": [
{
"declarator": "name",
"modifier": "private final",
"original_string": "private final String name;",
"type": "String",
"var_name": "name"
},
{
"declarator": "columns",
"modifier": "private final",
"original_string": "private final List<Example... | {
"body": "public List<ColumnMetadata> getColumnsMetadata()\n {\n return columnsMetadata;\n }",
"class_method_signature": "ExampleTable.getColumnsMetadata()",
"constructor": false,
"full_signature": "public List<ColumnMetadata> getColumnsMetadata()",
"identifier": "getColumnsMetadata",
"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_148 | {
"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 testGetTableStatisticsValidationFailure()\n {\n PartitionStatistics corruptedStatistics = PartitionStatistics.builder()\n .setBasicStatistics(new HiveBasicStatistics(-1, 0, 0, 0))\n .build();\n String partitionName = \"p1=string1/p2=1234... | {
"fields": [
{
"declarator": "log = Logger.get(MetastoreHiveStatisticsProvider.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(MetastoreHiveStatisticsProvider.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public TableStatistics getTableStatistics(\n ConnectorSession session,\n SchemaTableName table,\n Map<String, ColumnHandle> columns,\n Map<String, Type> columnTypes,\n List<HivePartition> partitions)\n {\n if (!isStatisticsEnab... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_518 | {
"fields": [],
"file": "presto-cli/src/test/java/io/prestosql/cli/TestClientOptions.java",
"identifier": "TestClientOptions",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = \"\\\\QMultiple entries with same key: test.token.foo=bar and test.token.foo=foo\\\\E\")\n public void testDuplicateExtraCredentialKey()\n {\n Console console = createConsole(\"--extra-credential\", \"... | {
"fields": [
{
"declarator": "NAME_VALUE_SPLITTER = Splitter.on('=').limit(2)",
"modifier": "private static final",
"original_string": "private static final Splitter NAME_VALUE_SPLITTER = Splitter.on('=').limit(2);",
"type": "Splitter",
"var_name": "NAME_VALUE_SPLITTER"
},
{... | {
"body": "public ClientSession toClientSession()\n {\n return new ClientSession(\n parseServer(server),\n user,\n source,\n Optional.ofNullable(traceToken),\n parseClientTags(nullToEmpty(clientTags)),\n clientInfo,\n ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1252 | {
"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 testDate()\n {\n assertEquals(getDomain(DATE, 0, null), none(DATE));\n assertEquals(getDomain(DATE, 10, null), all(DATE));\n\n assertEquals(getDomain(DATE, 0, dateColumnStats(null, null, null)), none(DATE));\n assertEquals(getDomain(DATE, 0, dateColumnS... | {
"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_1086 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/cost/TestStatisticRange.java",
"identifier": "TestStatisticRange",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAddAndCollapseDistinctValues()\n {\n assertEquals(unboundedRange(NaN).addAndCollapseDistinctValues(unboundedRange(NaN)), unboundedRange(NaN));\n assertEquals(unboundedRange(NaN).addAndCollapseDistinctValues(unboundedRange(1)), unboundedRange(NaN));\n asser... | {
"fields": [
{
"declarator": "INFINITE_TO_FINITE_RANGE_INTERSECT_OVERLAP_HEURISTIC_FACTOR = 0.25",
"modifier": "private static final",
"original_string": "private static final double INFINITE_TO_FINITE_RANGE_INTERSECT_OVERLAP_HEURISTIC_FACTOR = 0.25;",
"type": "double",
"var_name": ... | {
"body": "public StatisticRange addAndCollapseDistinctValues(StatisticRange other)\n {\n double overlapPercentOfThis = this.overlapPercentWith(other);\n double overlapPercentOfOther = other.overlapPercentWith(this);\n double overlapDistinctValuesThis = overlapPercentOfThis * distinctValues;\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_236 | {
"fields": [],
"file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/metadata/TestDatabaseConfig.java",
"identifier": "TestDatabaseConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = ImmutableMap.<String, String>builder()\n .put(\"metadata.db.type\", \"h2\")\n .build();\n\n DatabaseConfig expected = new DatabaseConfig()\n .setDatabas... | {
"fields": [
{
"declarator": "databaseType",
"modifier": "private",
"original_string": "private String databaseType;",
"type": "String",
"var_name": "databaseType"
}
],
"file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/metadata/DatabaseConfig.java... | {
"body": "@Config(\"metadata.db.type\")\n @ConfigDescription(\"Metadata database type (supported types: h2, mysql)\")\n public DatabaseConfig setDatabaseType(String databaseType)\n {\n this.databaseType = databaseType;\n return this;\n }",
"class_method_signature": "DatabaseConfig.setData... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_666 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java",
"identifier": "TestSmallintOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testMultiply()\n {\n assertFunction(\"SMALLINT'37' * SMALLINT'37'\", SMALLINT, (short) (37 * 37));\n assertFunction(\"SMALLINT'37' * SMALLINT'17'\", SMALLINT, (short) (37 * 17));\n assertFunction(\"SMALLINT'17' * SMALLINT'37'\", SMALLINT, (short) (17 * 37));\n... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/type/SmallintOperators.java",
"identifier": "SmallintOperators",
"interfaces": "",
"methods": [
{
"class_method_signature": "SmallintOperators.SmallintOperators()",
"constructor": true,
"full_signature": "private SmallintOp... | {
"body": "@ScalarOperator(MULTIPLY)\n @SqlType(StandardTypes.SMALLINT)\n public static long multiply(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right)\n {\n try {\n return Shorts.checkedCast(left * right);\n }\n catch (IllegalArgumentExc... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_689 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java",
"identifier": "TestIntegerOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testCastToVarchar()\n {\n assertFunction(\"cast(INTEGER'37' as varchar)\", VARCHAR, \"37\");\n assertFunction(\"cast(INTEGER'17' as varchar)\", VARCHAR, \"17\");\n }",
"class_method_signature": "TestIntegerOperators.testCastToVarchar()",
"constructor": false,
... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/type/IntegerOperators.java",
"identifier": "IntegerOperators",
"interfaces": "",
"methods": [
{
"class_method_signature": "IntegerOperators.IntegerOperators()",
"constructor": true,
"full_signature": "private IntegerOperato... | {
"body": "@ScalarOperator(CAST)\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice castToVarchar(@SqlType(StandardTypes.INTEGER) long value)\n {\n // todo optimize me\n return utf8Slice(String.valueOf(value));\n }",
"class_method_signature": "IntegerOperators.... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_373 | {
"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 testCreateSingleStatePresent()\n {\n GeometryState state = factory.createSingleState();\n state.setGeometry(OGCGeometry.fromText(\"POINT (1 2)\"));\n assertEquals(OGCGeometry.fromText(\"POINT (1 2)\"), state.getGeometry());\n assertTrue(state.getEstimat... | {
"fields": [
{
"declarator": "OGC_GEOMETRY_BASE_INSTANCE_SIZE = ClassLayout.parseClass(OGCGeometry.class).instanceSize()",
"modifier": "private static final",
"original_string": "private static final long OGC_GEOMETRY_BASE_INSTANCE_SIZE = ClassLayout.parseClass(OGCGeometry.class).instanceSize()... | {
"body": "@Override\n public GeometryState createSingleState()\n {\n return new SingleGeometryState();\n }",
"class_method_signature": "GeometryStateFactory.createSingleState()",
"constructor": false,
"full_signature": "@Override public GeometryState createSingleState()",
"identifier": "creat... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_723 | {
"fields": [
{
"declarator": "scheduler",
"modifier": "private",
"original_string": "private ScheduledExecutorService scheduler;",
"type": "ScheduledExecutorService",
"var_name": "scheduler"
},
{
"declarator": "pageBufferClientCallbackExecutor",
"modifier": "priv... | {
"body": "@Test(timeOut = 10000)\n public void testAddLocation()\n throws Exception\n {\n DataSize maxResponseSize = DataSize.of(10, Unit.MEGABYTE);\n MockExchangeRequestProcessor processor = new MockExchangeRequestProcessor(maxResponseSize);\n\n @SuppressWarnings(\"resource\")\... | {
"fields": [
{
"declarator": "NO_MORE_PAGES = new SerializedPage(EMPTY_SLICE, PageCodecMarker.MarkerSet.empty(), 0, 0)",
"modifier": "private static final",
"original_string": "private static final SerializedPage NO_MORE_PAGES = new SerializedPage(EMPTY_SLICE, PageCodecMarker.MarkerSet.empty(),... | {
"body": "public synchronized void addLocation(URI location)\n {\n requireNonNull(location, \"location is null\");\n\n // Ignore new locations after close\n // NOTE: this MUST happen before checking no more locations is checked\n if (closed.get()) {\n return;\n }\n\n ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1069 | {
"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 testValidJoinOnClause()\n {\n analyze(\"SELECT * FROM (VALUES (2, 2)) a(x,y) JOIN (VALUES (2, 2)) b(x,y) ON TRUE\");\n analyze(\"SELECT * FROM (VALUES (2, 2)) a(x,y) JOIN (VALUES (2, 2)) b(x,y) ON 1=1\");\n analyze(\"SELECT * FROM (VALUES (2, 2)) a(x,y) JOIN (... | {
"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_86 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java",
"identifier": "TestProtoUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testTableBadLayoutBytes()\n {\n Layout.Builder alluxioLayout = TestingAlluxioMetastoreObjects.getTestingHiveLayout()\n .setLayoutData(ByteString.copyFrom(new byte[] {'z', 'z', 'z'}));\n alluxio.grpc.... | {
"fields": [],
"file": "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/alluxio/ProtoUtils.java",
"identifier": "ProtoUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProtoUtils.ProtoUtils()",
"constructor": true,
"full_signature": "private ProtoUtils()"... | {
"body": "public static Database fromProto(alluxio.grpc.table.Database db)\n {\n return Database.builder()\n .setDatabaseName(db.getDbName())\n .setLocation(db.hasLocation() ? Optional.of(db.getLocation()) : Optional.empty())\n .setOwnerName(db.getOwnerName())\n... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_959 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestPruneApplyCorrelation.java",
"identifier": "TestPruneApplyCorrelation",
"interfaces": "",
"superclass": "extends BaseRuleTest"
} | {
"body": "@Test\n public void testAllCorrelationSymbolsReferencedInSubquery()\n {\n tester().assertThat(new PruneApplyCorrelation())\n .on(p -> {\n Symbol a = p.symbol(\"a\");\n Symbol inputSymbol = p.symbol(\"input_symbol\");\n Sym... | {
"fields": [
{
"declarator": "PATTERN = applyNode()",
"modifier": "private static final",
"original_string": "private static final Pattern<ApplyNode> PATTERN = applyNode();",
"type": "Pattern<ApplyNode>",
"var_name": "PATTERN"
}
],
"file": "presto-main/src/main/java/io/prest... | {
"body": "@Override\n public Result apply(ApplyNode applyNode, Captures captures, Context context)\n {\n Set<Symbol> subquerySymbols = extractUnique(applyNode.getSubquery(), context.getLookup());\n List<Symbol> newCorrelation = applyNode.getCorrelation().stream()\n .filter(subquery... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_69 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java",
"identifier": "TestGlueExpressionUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBuildGlueExpressionTupleDomainEqualAndRangeString()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addStringValues(\"col1\", \"2020-01-01\", \"2020-01-31\")\n .addRanges(\"col1\", Range.range(VarcharType.VARCHAR, utf8Sli... | {
"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_1205 | {
"fields": [
{
"declarator": "CATALOG_NAME = \"catalog\"",
"modifier": "private static final",
"original_string": "private static final String CATALOG_NAME = \"catalog\";",
"type": "String",
"var_name": "CATALOG_NAME"
},
{
"declarator": "testSession",
"modifier":... | {
"body": "@Test\n public void testDuplicatedCreateSchema()\n {\n String schemaName = \"test_db\";\n CreateSchema statement = new CreateSchema(QualifiedName.of(schemaName), false, ImmutableList.of());\n getFutureValue(new CreateSchemaTask().internalExecute(statement, metadata, new AllowAllA... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/execution/CreateSchemaTask.java",
"identifier": "CreateSchemaTask",
"interfaces": "implements DataDefinitionTask<CreateSchema>",
"methods": [
{
"class_method_signature": "CreateSchemaTask.getName()",
"constructor": false,
"f... | {
"body": "@VisibleForTesting\n ListenableFuture<?> internalExecute(CreateSchema statement, Metadata metadata, AccessControl accessControl, Session session, List<Expression> parameters)\n {\n CatalogSchemaName schema = createCatalogSchemaName(session, statement, Optional.of(statement.getSchemaName()));\n... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_670 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java",
"identifier": "TestSmallintOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testCastToInteger()\n {\n assertFunction(\"cast(SMALLINT'37' as integer)\", INTEGER, 37);\n assertFunction(\"cast(SMALLINT'17' as integer)\", INTEGER, 17);\n }",
"class_method_signature": "TestSmallintOperators.testCastToInteger()",
"constructor": false,
"fu... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/type/SmallintOperators.java",
"identifier": "SmallintOperators",
"interfaces": "",
"methods": [
{
"class_method_signature": "SmallintOperators.SmallintOperators()",
"constructor": true,
"full_signature": "private SmallintOp... | {
"body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.INTEGER)\n public static long castToInteger(@SqlType(StandardTypes.SMALLINT) long value)\n {\n return value;\n }",
"class_method_signature": "SmallintOperators.castToInteger(@SqlType(StandardTypes.SMALLINT) 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_220 | {
"fields": [
{
"declarator": "DEFAULT_TEST_ORDERS = new SchemaTableName(\"test\", \"orders\")",
"modifier": "private static final",
"original_string": "private static final SchemaTableName DEFAULT_TEST_ORDERS = new SchemaTableName(\"test\", \"orders\");",
"type": "SchemaTableName",
... | {
"body": "@Test\n public void testNoSchemaFilter()\n {\n // Create \"orders\" table in a different schema\n createTable(tableMetadataBuilder(new SchemaTableName(\"other\", \"orders\"))\n .column(\"orderkey\", BIGINT)\n .build());\n\n // Create another table th... | {
"fields": [
{
"declarator": "SHARD_UUID = \"shard_uuid\"",
"modifier": "private static final",
"original_string": "private static final String SHARD_UUID = \"shard_uuid\";",
"type": "String",
"var_name": "SHARD_UUID"
},
{
"declarator": "XXHASH64 = \"xxhash64\"",
... | {
"body": "@VisibleForTesting\n static Iterator<Long> getTableIds(IDBI dbi, TupleDomain<Integer> tupleDomain)\n {\n Map<Integer, Domain> domains = tupleDomain.getDomains().get();\n Domain schemaNameDomain = domains.get(getColumnIndex(SHARD_METADATA, SCHEMA_NAME));\n Domain tableNameDomain =... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1090 | {
"fields": [
{
"declarator": "SYMBOL = new Symbol(\"symbol\")",
"modifier": "private static final",
"original_string": "private static final Symbol SYMBOL = new Symbol(\"symbol\");",
"type": "Symbol",
"var_name": "SYMBOL"
},
{
"declarator": "NON_EMPTY_RANGE = openRange... | {
"body": "@Test\n public void testCapRowCount()\n {\n PlanNodeStatsEstimate unknownRowCount = statistics(NaN, NaN, NaN, NON_EMPTY_RANGE);\n PlanNodeStatsEstimate first = statistics(20, NaN, NaN, NON_EMPTY_RANGE);\n PlanNodeStatsEstimate second = statistics(10, NaN, NaN, NON_EMPTY_RANGE);\n... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/cost/PlanNodeStatsEstimateMath.java",
"identifier": "PlanNodeStatsEstimateMath",
"interfaces": "",
"methods": [
{
"class_method_signature": "PlanNodeStatsEstimateMath.PlanNodeStatsEstimateMath()",
"constructor": true,
"full_... | {
"body": "public static PlanNodeStatsEstimate capStats(PlanNodeStatsEstimate stats, PlanNodeStatsEstimate cap)\n {\n if (stats.isOutputRowCountUnknown() || cap.isOutputRowCountUnknown()) {\n return PlanNodeStatsEstimate.unknown();\n }\n\n PlanNodeStatsEstimate.Builder result = Plan... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_735 | {
"fields": [
{
"declarator": "BLOCK_TYPE_OPERATORS = new BlockTypeOperators(new TypeOperators())",
"modifier": "private static final",
"original_string": "private static final BlockTypeOperators BLOCK_TYPE_OPERATORS = new BlockTypeOperators(new TypeOperators());",
"type": "BlockTypeOperat... | {
"body": "@Test\n public void testBigintSimpleTypedSet()\n {\n List<Integer> expectedSetSizes = ImmutableList.of(1, 10, 100, 1000);\n List<Block> longBlocks =\n ImmutableList.of(\n createEmptyLongsBlock(),\n createLongsBlock(1L),\n ... | {
"fields": [
{
"declarator": "MAX_FUNCTION_MEMORY = DataSize.of(4, MEGABYTE)",
"modifier": "@VisibleForTesting\n public static final",
"original_string": "@VisibleForTesting\n public static final DataSize MAX_FUNCTION_MEMORY = DataSize.of(4, MEGABYTE);",
"type": "DataSize",
"v... | {
"body": "public int size()\n {\n return size;\n }",
"class_method_signature": "TypedSet.size()",
"constructor": false,
"full_signature": "public int size()",
"identifier": "size",
"invocations": [],
"modifiers": "public",
"parameters": "()",
"return": "int",
"signature": "int size()",... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_365 | {
"fields": [
{
"declarator": "SQL_PARSER = new SqlParser()",
"modifier": "private static final",
"original_string": "private static final SqlParser SQL_PARSER = new SqlParser();",
"type": "SqlParser",
"var_name": "SQL_PARSER"
}
],
"file": "presto-parser/src/test/java/io/pres... | {
"body": "@Test(timeOut = 2_000)\n public void testPotentialUnboundedLookahead()\n {\n createExpression(\"(\\n\" +\n \" 1 * -1 +\\n\" +\n \" 1 * -2 +\\n\" +\n \" 1 * -3 +\\n\" +\n \" 1 * -4 +\\n\" +\n \" ... | {
"fields": [
{
"declarator": "LEXER_ERROR_LISTENER = new BaseErrorListener()\n {\n @Override\n public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String message, RecognitionException e)\n {\n throw new ParsingExc... | {
"body": "public Expression createExpression(String expression, ParsingOptions parsingOptions)\n {\n return (Expression) invokeParser(\"expression\", expression, SqlBaseParser::standaloneExpression, parsingOptions);\n }",
"class_method_signature": "SqlParser.createExpression(String expression, Parsing... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_90 | {
"fields": [],
"file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java",
"identifier": "TestProtoUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testBucketPropertyNoBuckets()\n {\n alluxio.grpc.table.layout.hive.HiveBucketProperty.Builder bucketProperty = TestingAlluxioMetastoreObjects.getTestingHiveBucketProperty();\n bucketProperty.clearBucketCount();\n Optional<HiveBucketProperty> bp = ProtoUtils.fr... | {
"fields": [],
"file": "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/alluxio/ProtoUtils.java",
"identifier": "ProtoUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "ProtoUtils.ProtoUtils()",
"constructor": true,
"full_signature": "private ProtoUtils()"... | {
"body": "public static Database fromProto(alluxio.grpc.table.Database db)\n {\n return Database.builder()\n .setDatabaseName(db.getDbName())\n .setLocation(db.hasLocation() ? Optional.of(db.getLocation()) : Optional.empty())\n .setOwnerName(db.getOwnerName())\n... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_109 | {
"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 testInvalidDbGetAllTAbles()\n {\n assertTrue(metastore.getAllTables(BAD_DATABASE).isEmpty());\n }",
"class_method_signature": "TestCachingHiveMetastore.testInvalidDbGetAllTAbles()",
"constructor": false,
"full_signature": "@Test public void testInvalidDbGetAllTAble... | {
"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> getAllTables(String databaseName)\n {\n return get(tableNamesCache, databaseName);\n }",
"class_method_signature": "CachingHiveMetastore.getAllTables(String databaseName)",
"constructor": false,
"full_signature": "@Override public List<String> getAllTab... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_559 | {
"fields": [
{
"declarator": "tokenRing = RandomPartitionerTokenRing.INSTANCE",
"modifier": "private static final",
"original_string": "private static final RandomPartitionerTokenRing tokenRing = RandomPartitionerTokenRing.INSTANCE;",
"type": "RandomPartitionerTokenRing",
"var_name"... | {
"body": "@Test\n public void testGetRingFraction()\n {\n assertEquals(tokenRing.getTokenCountInRange(\"0\", \"1\"), ONE);\n assertEquals(tokenRing.getTokenCountInRange(\"0\", \"200\"), new BigInteger(\"200\"));\n assertEquals(tokenRing.getTokenCountInRange(\"0\", \"10\"), new BigInteger(\... | {
"fields": [
{
"declarator": "INSTANCE = new RandomPartitionerTokenRing()",
"modifier": "public static final",
"original_string": "public static final RandomPartitionerTokenRing INSTANCE = new RandomPartitionerTokenRing();",
"type": "RandomPartitionerTokenRing",
"var_name": "INSTANC... | {
"body": "@Override\n public double getRingFraction(String start, String end)\n {\n return getTokenCountInRange(start, end).doubleValue() / TOTAL_TOKEN_COUNT.doubleValue();\n }",
"class_method_signature": "RandomPartitionerTokenRing.getRingFraction(String start, String end)",
"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_1213 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/execution/scheduler/TestPhasedExecutionSchedule.java",
"identifier": "TestPhasedExecutionSchedule",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUnion()\n {\n PlanFragment aFragment = createTableScanPlanFragment(\"a\");\n PlanFragment bFragment = createTableScanPlanFragment(\"b\");\n PlanFragment cFragment = createTableScanPlanFragment(\"c\");\n PlanFragment unionFragment = createUnionPlanFr... | {
"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_277 | {
"fields": [
{
"declarator": "prometheusHttpServer",
"modifier": "private",
"original_string": "private PrometheusHttpServer prometheusHttpServer;",
"type": "PrometheusHttpServer",
"var_name": "prometheusHttpServer"
},
{
"declarator": "split = new PrometheusSplit(URI.c... | {
"body": "@Test\n public void testQueryDividedIntoSplitsLastSplitHasRightTime()\n throws URISyntaxException\n {\n Instant now = LocalDateTime.of(2019, 10, 2, 7, 26, 56, 0).toInstant(UTC);\n PrometheusConnectorConfig config = getCommonConfig(prometheusHttpServer.resolve(\"/prometheus-da... | {
"fields": [
{
"declarator": "uri",
"modifier": "private final",
"original_string": "private final URI uri;",
"type": "URI",
"var_name": "uri"
},
{
"declarator": "addresses",
"modifier": "private final",
"original_string": "private final List<HostAddress> a... | {
"body": "@JsonProperty\n public URI getUri()\n {\n return uri;\n }",
"class_method_signature": "PrometheusSplit.getUri()",
"constructor": false,
"full_signature": "@JsonProperty public URI getUri()",
"identifier": "getUri",
"invocations": [],
"modifiers": "@JsonProperty public",
"param... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_627 | {
"fields": [
{
"declarator": "blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde()",
"modifier": "private final",
"original_string": "private final BlockEncodingSerde blockEncodingSerde = createTestMetadataManager().getBlockEncodingSerde();",
"type": "BlockEncodingSerd... | {
"body": "@Test\n public void testDistributesSpillOverPaths()\n throws Exception\n {\n List<Type> types = ImmutableList.of(BIGINT);\n List<Path> spillPaths = ImmutableList.of(spillPath1.toPath(), spillPath2.toPath());\n FileSingleStreamSpillerFactory spillerFactory = spillerFact... | {
"fields": [
{
"declarator": "log = Logger.get(FileSingleStreamSpillerFactory.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(FileSingleStreamSpillerFactory.class);",
"type": "Logger",
"var_name": "log"
},
{
... | {
"body": "@Override\n public SingleStreamSpiller create(List<Type> types, SpillContext spillContext, LocalMemoryContext memoryContext)\n {\n Optional<SpillCipher> spillCipher = Optional.empty();\n if (spillEncryptionEnabled) {\n spillCipher = Optional.of(new AesSpillCipher());\n ... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_332 | {
"fields": [],
"file": "presto-jdbc/src/test/java/io/prestosql/jdbc/TestPrestoDriverUri.java",
"identifier": "TestPrestoDriverUri",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testUriWithSslEnabledPassword()\n throws SQLException\n {\n PrestoDriverUri parameters = createDriverUri(\"presto://localhost:8080/blackhole?SSL=true&SSLTrustStorePath=truststore.jks&SSLTrustStorePassword=password\");\n assertUriPortScheme(parameters, 8080... | {
"fields": [
{
"declarator": "JDBC_URL_START = \"jdbc:\"",
"modifier": "private static final",
"original_string": "private static final String JDBC_URL_START = \"jdbc:\";",
"type": "String",
"var_name": "JDBC_URL_START"
},
{
"declarator": "QUERY_SPLITTER = Splitter.on(... | {
"body": "public Properties getProperties()\n {\n return properties;\n }",
"class_method_signature": "PrestoDriverUri.getProperties()",
"constructor": false,
"full_signature": "public Properties getProperties()",
"identifier": "getProperties",
"invocations": [],
"modifiers": "public",
"par... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_298 | {
"fields": [],
"file": "presto-thrift-api/src/test/java/io/prestosql/plugin/thrift/api/TestNameValidationUtils.java",
"identifier": "TestNameValidationUtils",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testCheckValidColumnName()\n {\n checkValidName(\"abc01_def2\");\n assertThrows(() -> checkValidName(null));\n assertThrows(() -> checkValidName(\"\"));\n assertThrows(() -> checkValidName(\"Abc\"));\n assertThrows(() -> checkValidName(\"0abc\"))... | {
"fields": [],
"file": "presto-thrift-api/src/main/java/io/prestosql/plugin/thrift/api/NameValidationUtils.java",
"identifier": "NameValidationUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "NameValidationUtils.NameValidationUtils()",
"constructor": true,
"full_signa... | {
"body": "public static String checkValidName(String name)\n {\n checkArgument(!isNullOrEmpty(name), \"name is null or empty\");\n checkArgument('a' <= name.charAt(0) && name.charAt(0) <= 'z', \"name must start with a lowercase latin letter: '%s'\", name);\n for (int i = 1; i < name.length();... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_762 | {
"fields": [
{
"declarator": "TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE)",
"modifier": "private static final",
"original_string": "private static final List<Type> TYPES = ImmutableList.of(BIGINT, REAL, DOUBLE);",
"type": "List<Type>",
"var_name": "TYPES"
}
],
"file": "pr... | {
"body": "@Test\n public void testFlushOnBigPage()\n {\n Page smallPage = createSequencePage(TYPES, 10);\n Page bigPage = createSequencePage(TYPES, 100);\n\n WorkProcessor<Page> mergePages = mergePages(\n TYPES,\n bigPage.getSizeInBytes(),\n big... | {
"fields": [
{
"declarator": "MAX_MIN_PAGE_SIZE = 1024 * 1024",
"modifier": "private static final",
"original_string": "private static final int MAX_MIN_PAGE_SIZE = 1024 * 1024;",
"type": "int",
"var_name": "MAX_MIN_PAGE_SIZE"
}
],
"file": "presto-main/src/main/java/io/prest... | {
"body": "private MergePages() {}",
"class_method_signature": "MergePages.MergePages()",
"constructor": true,
"full_signature": "private MergePages()",
"identifier": "MergePages",
"invocations": [],
"modifiers": "private",
"parameters": "()",
"return": "",
"signature": " MergePages()",
"testcase... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1028 | {
"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 testImplicitCrossJoin()\n {\n // TODO: validate output\n analyze(\"SELECT * FROM t1, t2\");\n }",
"class_method_signature": "TestAnalyzer.testImplicitCrossJoin()",
"constructor": false,
"full_signature": "@Test public void testImplicitCrossJoin()",
"identi... | {
"fields": [
{
"declarator": "metadata",
"modifier": "private final",
"original_string": "private final Metadata metadata;",
"type": "Metadata",
"var_name": "metadata"
},
{
"declarator": "sqlParser",
"modifier": "private final",
"original_string": "private ... | {
"body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }",
"class_method_signature": "Analyzer.analyze(Statement statement)",
"constructor": false,
"full_signature": "public Analysis analyze(Statement statement)",
"identifier": "analyze",
"invocations"... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1182 | {
"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 PartitionedOutputBuffer buffer = createPartitionedBuffer(\n createInitialEmptyOutputBuffers(PARTITIONED)\n .withBuffer(FIRST, 0)\n .withBuffer(SECOND, 1)\n .withNoMoreBuffe... | {
"fields": [
{
"declarator": "state",
"modifier": "private final",
"original_string": "private final StateMachine<BufferState> state;",
"type": "StateMachine<BufferState>",
"var_name": "state"
},
{
"declarator": "outputBuffers",
"modifier": "private final",
... | {
"body": "@Override\n public void abort(OutputBufferId bufferId)\n {\n requireNonNull(bufferId, \"bufferId is null\");\n\n partitions.get(bufferId.getId()).destroy();\n\n checkFlushComplete();\n }",
"class_method_signature": "PartitionedOutputBuffer.abort(OutputBufferId bufferId)",
... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_3 | {
"fields": [],
"file": "presto-client/src/test/java/io/prestosql/client/TestIntervalYearMonth.java",
"identifier": "TestIntervalYearMonth",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMaxYears()\n {\n int years = Integer.MAX_VALUE / 12;\n assertEquals(toMonths(years, 0), years * 12);\n }",
"class_method_signature": "TestIntervalYearMonth.testMaxYears()",
"constructor": false,
"full_signature": "@Test public void testMaxYears()",
"id... | {
"fields": [
{
"declarator": "INT_MIN_VALUE = \"-178956970-8\"",
"modifier": "private static final",
"original_string": "private static final String INT_MIN_VALUE = \"-178956970-8\";",
"type": "String",
"var_name": "INT_MIN_VALUE"
},
{
"declarator": "FORMAT = Pattern.c... | {
"body": "public static int toMonths(int year, int months)\n {\n try {\n return addExact(multiplyExact(year, 12), months);\n }\n catch (ArithmeticException e) {\n throw new IllegalArgumentException(e);\n }\n }",
"class_method_signature": "IntervalYearMonth.to... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_918 | {
"fields": [
{
"declarator": "C_BIGINT = new Symbol(\"c_bigint\")",
"modifier": "private static final",
"original_string": "private static final Symbol C_BIGINT = new Symbol(\"c_bigint\");",
"type": "Symbol",
"var_name": "C_BIGINT"
},
{
"declarator": "C_DOUBLE = new Sy... | {
"body": "@Test\n public void testToPredicateWithRangeOptimisation()\n {\n TupleDomain<Symbol> tupleDomain;\n\n tupleDomain = withColumnDomains(ImmutableMap.of(C_BIGINT, Domain.create(ValueSet.ofRanges(Range.greaterThan(BIGINT, 1L), Range.lessThan(BIGINT, 1L)), false)));\n assertEquals(toP... | {
"fields": [
{
"declarator": "metadata",
"modifier": "private final",
"original_string": "private final Metadata metadata;",
"type": "Metadata",
"var_name": "metadata"
},
{
"declarator": "literalEncoder",
"modifier": "private final",
"original_string": "pri... | {
"body": "public Expression toPredicate(TupleDomain<Symbol> tupleDomain)\n {\n if (tupleDomain.isNone()) {\n return FALSE_LITERAL;\n }\n\n Map<Symbol, Domain> domains = tupleDomain.getDomains().get();\n return domains.entrySet().stream()\n .map(entry -> toPred... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_28 | {
"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 testTableRulesForFilterColumnsWithNoAccess()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-no-access.json\");\n assertEquals(\n accessControl.filterColumns(BOB, new CatalogSchemaTableName(\"some-catalog\"... | {
"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 List<ColumnMetadata> filterColumns(SystemSecurityContext context, CatalogSchemaTableName tableName, List<ColumnMetadata> columns)\n {\n if (!checkAnyTablePermission(context, tableName)) {\n return ImmutableList.of();\n }\n\n return columns;\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_1244 | {
"fields": [
{
"declarator": "STRING_APPLE = utf8Slice(\"apple\")",
"modifier": "private static final",
"original_string": "private static final Slice STRING_APPLE = utf8Slice(\"apple\");",
"type": "Slice",
"var_name": "STRING_APPLE"
},
{
"declarator": "STRING_OESTERRE... | {
"body": "@Test\n public void testToStringStatistics()\n {\n // ORIGINAL version only produces stats at the row group level\n assertNull(OrcMetadataReader.toStringStatistics(\n ORIGINAL,\n OrcProto.StringStatistics.newBuilder()\n .setMinimum(\"... | {
"fields": [
{
"declarator": "REPLACEMENT_CHARACTER_CODE_POINT = 0xFFFD",
"modifier": "private static final",
"original_string": "private static final int REPLACEMENT_CHARACTER_CODE_POINT = 0xFFFD;",
"type": "int",
"var_name": "REPLACEMENT_CHARACTER_CODE_POINT"
},
{
"d... | {
"body": "static StringStatistics toStringStatistics(HiveWriterVersion hiveWriterVersion, OrcProto.StringStatistics stringStatistics, boolean isRowGroup)\n {\n if (hiveWriterVersion == ORIGINAL && !isRowGroup) {\n return null;\n }\n\n Slice maximum = stringStatistics.hasMaximum() ?... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_129 | {
"fields": [
{
"declarator": "HTTP_RANGE_NOT_SATISFIABLE = 416",
"modifier": "private static final",
"original_string": "private static final int HTTP_RANGE_NOT_SATISFIABLE = 416;",
"type": "int",
"var_name": "HTTP_RANGE_NOT_SATISFIABLE"
}
],
"file": "presto-hive/src/test/ja... | {
"body": "@Test\n public void testCustomCredentialsProvider()\n throws Exception\n {\n Configuration config = new Configuration(false);\n config.set(S3_CREDENTIALS_PROVIDER, TestCredentialsProvider.class.getName());\n try (PrestoS3FileSystem fs = new PrestoS3FileSystem()) {\n ... | {
"fields": [
{
"declarator": "S3_USER_AGENT_SUFFIX = \"presto\"",
"modifier": "public static final",
"original_string": "public static final String S3_USER_AGENT_SUFFIX = \"presto\";",
"type": "String",
"var_name": "S3_USER_AGENT_SUFFIX"
},
{
"declarator": "S3_USER_AGE... | {
"body": "@Override\n public void initialize(URI uri, Configuration conf)\n throws IOException\n {\n requireNonNull(uri, \"uri is null\");\n requireNonNull(conf, \"conf is null\");\n super.initialize(uri, conf);\n setConf(conf);\n\n try {\n this.uri = ne... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_579 | {
"fields": [
{
"declarator": "database",
"modifier": "private",
"original_string": "private TestingDatabase database;",
"type": "TestingDatabase",
"var_name": "database"
},
{
"declarator": "metadata",
"modifier": "private",
"original_string": "private JdbcM... | {
"body": "@Test\n public void testGetColumnHandles()\n {\n // known table\n assertEquals(metadata.getColumnHandles(SESSION, tableHandle), ImmutableMap.of(\n \"text\", new JdbcColumnHandle(\"TEXT\", JDBC_VARCHAR, VARCHAR),\n \"text_short\", new JdbcColumnHandle(\"TEXT... | {
"fields": [
{
"declarator": "SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\"",
"modifier": "private static final",
"original_string": "private static final String SYNTHETIC_COLUMN_NAME_PREFIX = \"_presto_generated_\";",
"type": "String",
"var_name": "SYNTHETIC_COLUMN_NAME_PRE... | {
"body": "@Override\n public Map<String, ColumnHandle> getColumnHandles(ConnectorSession session, ConnectorTableHandle tableHandle)\n {\n JdbcTableHandle jdbcTableHandle = (JdbcTableHandle) tableHandle;\n verify(!jdbcTableHandle.isSynthetic(), \"Not a table reference: %s\", jdbcTableHandle);\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_1233 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/event/TestQueryMonitorConfig.java",
"identifier": "TestQueryMonitorConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"event.max-output-stage-size\", \"512kB\")\n .build();\n\n QueryMonitorConfig expected = new QueryMonitorConfig()\n ... | {
"fields": [
{
"declarator": "maxOutputStageJsonSize = DataSize.of(16, Unit.MEGABYTE)",
"modifier": "private",
"original_string": "private DataSize maxOutputStageJsonSize = DataSize.of(16, Unit.MEGABYTE);",
"type": "DataSize",
"var_name": "maxOutputStageJsonSize"
}
],
"file"... | {
"body": "@Config(\"event.max-output-stage-size\")\n public QueryMonitorConfig setMaxOutputStageJsonSize(DataSize maxOutputStageJsonSize)\n {\n this.maxOutputStageJsonSize = maxOutputStageJsonSize;\n return this;\n }",
"class_method_signature": "QueryMonitorConfig.setMaxOutputStageJsonSize(D... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_980 | {
"fields": [
{
"declarator": "A = new Symbol(\"a\")",
"modifier": "private static final",
"original_string": "private static final Symbol A = new Symbol(\"a\");",
"type": "Symbol",
"var_name": "A"
},
{
"declarator": "B = new Symbol(\"b\")",
"modifier": "private s... | {
"body": "@Test\n public void testAggregation()\n {\n PlanNode node = new AggregationNode(\n newId(),\n filter(\n baseTableScan,\n and(\n equals(AE, DE),\n equals(BE,... | {
"fields": [
{
"declarator": "SYMBOL_MATCHES_EXPRESSION =\n entry -> entry.getValue().equals(entry.getKey().toSymbolReference())",
"modifier": "private static final",
"original_string": "private static final Predicate<Map.Entry<Symbol, ? extends Expression>> SYMBOL_MATCHES_EXPRESSION... | {
"body": "public Expression extract(Session session, PlanNode node, TypeProvider types, TypeAnalyzer typeAnalyzer)\n {\n return node.accept(new Visitor(domainTranslator, metadata, session, types, typeAnalyzer, useTableProperties), null);\n }",
"class_method_signature": "EffectivePredicateExtractor.ext... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_596 | {
"fields": [
{
"declarator": "tempDirectory",
"modifier": "private",
"original_string": "private Path tempDirectory;",
"type": "Path",
"var_name": "tempDirectory"
}
],
"file": "presto-hive-hadoop2/src/test/java/io/prestosql/plugin/hive/TestHiveHadoop2Plugin.java",
"identif... | {
"body": "@Test\n public void testHdfsImpersonationAndHiveCachingMutuallyExclusive()\n {\n Plugin plugin = new HiveHadoop2Plugin();\n ConnectorFactory connectorFactory = Iterables.getOnlyElement(plugin.getConnectorFactories());\n\n assertThatThrownBy(() -> connectorFactory.create(\n ... | {
"fields": [],
"file": "presto-hive-hadoop2/src/main/java/io/prestosql/plugin/hive/HiveHadoop2Plugin.java",
"identifier": "HiveHadoop2Plugin",
"interfaces": "implements Plugin",
"methods": [
{
"class_method_signature": "HiveHadoop2Plugin.getConnectorFactories()",
"constructor": false,
"... | {
"body": "@Override\n public Iterable<ConnectorFactory> getConnectorFactories()\n {\n return ImmutableList.of(new HiveConnectorFactory(\"hive-hadoop2\"));\n }",
"class_method_signature": "HiveHadoop2Plugin.getConnectorFactories()",
"constructor": false,
"full_signature": "@Override public Itera... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_715 | {
"fields": [
{
"declarator": "METADATA = createTestMetadataManager()",
"modifier": "private static final",
"original_string": "private static final Metadata METADATA = createTestMetadataManager();",
"type": "Metadata",
"var_name": "METADATA"
},
{
"declarator": "SIGNATU... | {
"body": "@Test\n public void testSameLiteralInArgumentsAndReturnValue()\n throws Throwable\n {\n Signature signature = Signature.builder()\n .name(\"foo\")\n .returnType(new TypeSignature(\"varchar\", typeVariable(\"x\")))\n .argumentTypes(new Typ... | {
"fields": [
{
"declarator": "choices",
"modifier": "private final",
"original_string": "private final List<PolymorphicScalarFunctionChoice> choices;",
"type": "List<PolymorphicScalarFunctionChoice>",
"var_name": "choices"
}
],
"file": "presto-main/src/main/java/io/prestosql... | {
"body": "@Override\n protected ScalarFunctionImplementation specialize(FunctionBinding functionBinding)\n {\n ImmutableList.Builder<ScalarImplementationChoice> implementationChoices = ImmutableList.builder();\n\n for (PolymorphicScalarFunctionChoice choice : choices) {\n implementatio... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_345 | {
"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 testGetPseudoColumns()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getPseudoColumns(null, null, null, null)) {\n assertFalse(rs.next());\n }\n ... | {
"fields": [
{
"declarator": "SEARCH_STRING_ESCAPE = \"\\\\\"",
"modifier": "private static final",
"original_string": "private static final String SEARCH_STRING_ESCAPE = \"\\\\\";",
"type": "String",
"var_name": "SEARCH_STRING_ESCAPE"
},
{
"declarator": "connection",
... | {
"body": "@Override\n public ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern)\n throws SQLException\n {\n return selectEmpty(\"\" +\n \"SELECT TABLE_CAT, TABLE_SCHEM, TABLE_NAME, COLUMN_NAME, DATA_TYPE,\\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_650 | {
"fields": [],
"file": "presto-main/src/test/java/io/prestosql/type/TestBigintOperators.java",
"identifier": "TestBigintOperators",
"interfaces": "",
"superclass": "extends AbstractTestFunctions"
} | {
"body": "@Test\n public void testCastToBoolean()\n {\n assertFunction(\"cast(37 as boolean)\", BOOLEAN, true);\n assertFunction(\"cast(100000000017 as boolean)\", BOOLEAN, true);\n assertFunction(\"cast(0 as boolean)\", BOOLEAN, false);\n }",
"class_method_signature": "TestBigintOper... | {
"fields": [],
"file": "presto-main/src/main/java/io/prestosql/type/BigintOperators.java",
"identifier": "BigintOperators",
"interfaces": "",
"methods": [
{
"class_method_signature": "BigintOperators.BigintOperators()",
"constructor": true,
"full_signature": "private BigintOperators()"... | {
"body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.BOOLEAN)\n public static boolean castToBoolean(@SqlType(StandardTypes.BIGINT) long value)\n {\n return value != 0;\n }",
"class_method_signature": "BigintOperators.castToBoolean(@SqlType(StandardTypes.BIGINT) long value)",
"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_200 | {
"fields": [],
"file": "presto-password-authenticators/src/test/java/io/prestosql/plugin/password/ldap/TestLdapAuthenticator.java",
"identifier": "TestLdapAuthenticator",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testContainsSpecialCharacters()\n {\n assertThat(LdapAuthenticator.containsSpecialCharacters(\"The quick brown fox jumped over the lazy dogs\"))\n .as(\"English pangram\")\n .isEqualTo(false);\n assertThat(LdapAuthenticator.containsSpeci... | {
"fields": [
{
"declarator": "log = Logger.get(LdapAuthenticator.class)",
"modifier": "private static final",
"original_string": "private static final Logger log = Logger.get(LdapAuthenticator.class);",
"type": "Logger",
"var_name": "log"
},
{
"declarator": "SPECIAL_CH... | {
"body": "@VisibleForTesting\n static boolean containsSpecialCharacters(String user)\n {\n if (WHITESPACE.indexIn(user) == 0 || WHITESPACE.lastIndexIn(user) == user.length() - 1) {\n return true;\n }\n return SPECIAL_CHARACTERS.matchesAnyOf(user);\n }",
"class_method_signat... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
166515022_1264 | {
"fields": [],
"file": "presto-bigquery/src/test/java/io/prestosql/plugin/bigquery/TestBigQueryConfig.java",
"identifier": "TestBigQueryConfig",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testExplicitPropertyMappingsWithCredentialsFile()\n throws IOException\n {\n Path credentialsFile = Files.createTempFile(null, null);\n\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"bigquery.credentia... | {
"fields": [
{
"declarator": "DEFAULT_MAX_READ_ROWS_RETRIES = 3",
"modifier": "public static final",
"original_string": "public static final int DEFAULT_MAX_READ_ROWS_RETRIES = 3;",
"type": "int",
"var_name": "DEFAULT_MAX_READ_ROWS_RETRIES"
},
{
"declarator": "VIEWS_EN... | {
"body": "public Optional<@FileExists String> getCredentialsFile()\n {\n return credentialsFile;\n }",
"class_method_signature": "BigQueryConfig.getCredentialsFile()",
"constructor": false,
"full_signature": "public Optional<@FileExists String> getCredentialsFile()",
"identifier": "getCredential... | {
"created": "1/19/2019 6:38:14 AM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 166515022,
"size": null,
"stargazer_count": null,
"stars": 849,
"updates": "2020-01-27T22:04:31+00:00",
"url": "https://github.com/prestosql/prest... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.