id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
166515022_392
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testLineInterpolatePoint()\n {\n assertFunction(\"ST_AsText(line_interpolate_point(ST_GeometryFromText('LINESTRING EMPTY'), 0.5))\", VARCHAR, null);\n\n assertLineInterpolatePoint(\"LINESTRING (0 0, 1 1, 10 10)\", 0.0, \"POINT (0 0)\");\n assertLineInterpolate...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@SqlNullable\n @Description(\"Returns a Point interpolated along a LineString at the fraction given.\")\n @ScalarFunction(\"line_interpolate_point\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice lineInterpolatePoint(\n @SqlType(GEOMETRY_TYPE_NAME) Slice input,\n @S...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_668
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestSmallintOperators.java", "identifier": "TestSmallintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testModulus()\n {\n assertFunction(\"SMALLINT'37' % SMALLINT'37'\", SMALLINT, (short) 0);\n assertFunction(\"SMALLINT'37' % SMALLINT'17'\", SMALLINT, (short) (37 % 17));\n assertFunction(\"SMALLINT'17' % SMALLINT'37'\", SMALLINT, (short) (17 % 37));\n a...
{ "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(MODULUS)\n @SqlType(StandardTypes.SMALLINT)\n public static long modulus(@SqlType(StandardTypes.SMALLINT) long left, @SqlType(StandardTypes.SMALLINT) long right)\n {\n try {\n return left % right;\n }\n catch (ArithmeticException e) {\n 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_238
{ "fields": [ { "declarator": "dummyHandle", "modifier": "private", "original_string": "private Handle dummyHandle;", "type": "Handle", "var_name": "dummyHandle" }, { "declarator": "metadataDao", "modifier": "private", "original_string": "private MetadataDao...
{ "body": "@Test\n public void testMaintenanceUnblockedOnStart()\n {\n long tableId = createTable(\"test\");\n\n assertFalse(metadataDao.isMaintenanceBlockedLocked(tableId));\n metadataDao.blockMaintenance(tableId);\n assertTrue(metadataDao.isMaintenanceBlockedLocked(tableId));\n\n ...
{ "fields": [ { "declarator": "log = Logger.get(RaptorConnector.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(RaptorConnector.class);", "type": "Logger", "var_name": "log" }, { "declarator": "lifeCycleManag...
{ "body": "@PostConstruct\n public void start()\n {\n if (coordinator) {\n dao.unblockAllMaintenance();\n }\n }", "class_method_signature": "RaptorConnector.start()", "constructor": false, "full_signature": "@PostConstruct public void start()", "identifier": "start", "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_67
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildGlueExpressionTupleDomainRange()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addStringValues(\"col1\", \"2020-01-01\")\n .addRanges(\"col2\", Range.greaterThan(BIGINT, 100L))\n .addRanges(\"col2\",...
{ "fields": [ { "declarator": "NULL_STRING = \"__HIVE_DEFAULT_PARTITION__\"", "modifier": "static final", "original_string": "static final String NULL_STRING = \"__HIVE_DEFAULT_PARTITION__\";", "type": "String", "var_name": "NULL_STRING" }, { "declarator": "GLUE_EXPRESS...
{ "body": "public static String buildGlueExpression(List<String> columnNames, TupleDomain<String> partitionKeysFilter, boolean assumeCanonicalPartitionKeys)\n {\n return buildGlueExpression(columnNames, partitionKeysFilter, assumeCanonicalPartitionKeys, GLUE_EXPRESSION_CHAR_LIMIT);\n }", "class_method_...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_812
{ "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 testCbrt()\n {\n for (double doubleValue : DOUBLE_VALUES) {\n assertFunction(\"cbrt(\" + doubleValue + \")\", DOUBLE, Math.cbrt(doubleValue));\n assertFunction(\"cbrt(REAL '\" + (float) doubleValue + \"')\", DOUBLE, Math.cbrt((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(\"Cube root\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double cbrt(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Math.cbrt(num);\n }", "class_method_signature": "MathFunctions.cbrt(@SqlType(StandardTypes.DOUBLE) double num)", "cons...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_111
{ "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 testInvalidDbGetTable()\n {\n assertFalse(metastore.getTable(IDENTITY, BAD_DATABASE, TEST_TABLE).isPresent());\n\n assertEquals(stats.getGetTable().getThriftExceptions().getTotalCount(), 0);\n assertEquals(stats.getGetTable().getTotalFailures().getTotalCount()...
{ "fields": [ { "declarator": "delegate", "modifier": "protected final", "original_string": "protected final HiveMetastore delegate;", "type": "HiveMetastore", "var_name": "delegate" }, { "declarator": "databaseCache", "modifier": "private final", "original_...
{ "body": "@Override\n public Optional<Table> getTable(HiveIdentity identity, String databaseName, String tableName)\n {\n identity = updateIdentity(identity);\n return get(tableCache, new WithIdentity<>(identity, hiveTableName(databaseName, tableName)));\n }", "class_method_signature": "Cach...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_541
{ "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 testMatchByUsers()\n {\n ManagerSpec managerSpec = managerSpec(\n resourceGroupSpec(\"group\"),\n ImmutableList.of(selectorSpec(groupIdTemplate(\"group\"))\n .users(\"First matching user\", \"Second matching user\")));\n\...
{ "fields": [ { "declarator": "CODEC = new JsonCodecFactory(\n () -> new ObjectMapperProvider().get().enable(FAIL_ON_UNKNOWN_PROPERTIES))\n .jsonCodec(ManagerSpec.class)", "modifier": "private static final", "original_string": "private static final JsonCodec<ManagerSpec> CO...
{ "body": "@Override\n public Optional<SelectionContext<ResourceGroupIdTemplate>> match(SelectionCriteria criteria)\n {\n return selectors.stream()\n .map(s -> s.match(criteria))\n .filter(Optional::isPresent)\n .map(Optional::get)\n .findFirst(...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_404
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTSymmetricDifference()\n {\n assertFunction(\"ST_AsText(ST_SymDifference(ST_GeometryFromText('POINT (50 100)'), ST_GeometryFromText('POINT (50 150)')))\", VARCHAR, \"MULTIPOINT ((50 100), (50 150))\");\n assertFunction(\"ST_AsText(ST_SymDifference(ST_GeometryFro...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns the Geometry value that represents the point set symmetric difference of two Geometries\")\n @ScalarFunction(\"ST_SymDifference\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice stSymmetricDifference(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMETRY_TYPE_NAME)...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_957
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestLambdaCaptureDesugaringRewriter.java", "identifier": "TestLambdaCaptureDesugaringRewriter", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRewriteBasicLambda()\n {\n Map<Symbol, Type> symbols = ImmutableMap.of(new Symbol(\"a\"), BigintType.BIGINT);\n SymbolAllocator allocator = new SymbolAllocator(symbols);\n\n assertEquals(rewrite(expression(\"x -> a + x\"), allocator.getTypes(), allocator),...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/LambdaCaptureDesugaringRewriter.java", "identifier": "LambdaCaptureDesugaringRewriter", "interfaces": "", "methods": [ { "class_method_signature": "LambdaCaptureDesugaringRewriter.rewrite(Expression expression...
{ "body": "public static Expression rewrite(Expression expression, TypeProvider symbolTypes, SymbolAllocator symbolAllocator)\n {\n return ExpressionTreeRewriter.rewriteWith(new Visitor(symbolTypes, symbolAllocator), expression, new Context());\n }", "class_method_signature": "LambdaCaptureDesugaringRe...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_88
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/alluxio/TestProtoUtils.java", "identifier": "TestProtoUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSortingColumn()\n {\n alluxio.grpc.table.layout.hive.SortingColumn.Builder column = TestingAlluxioMetastoreObjects.getTestingSortingColumn();\n SortingColumn c = ProtoUtils.fromProto(column.build());\n assertEquals(column.getColumnName(), c.getColumnName()...
{ "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_1030
{ "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 testGroupByWithQualifiedName()\n {\n // TODO: verify output\n analyze(\"SELECT a FROM t1 GROUP BY t1.a\");\n }", "class_method_signature": "TestAnalyzer.testGroupByWithQualifiedName()", "constructor": false, "full_signature": "@Test public void testGroupByWi...
{ "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_280
{ "fields": [ { "declarator": "TYPE_MANAGER = new InternalTypeManager(createTestMetadataManager(), new TypeOperators())", "modifier": "private static final", "original_string": "private static final TypeManager TYPE_MANAGER = new InternalTypeManager(createTestMetadataManager(), new TypeOperators...
{ "body": "@Test\n public void testCursorSimple()\n {\n RecordSet recordSet = new PrometheusRecordSet(\n new PrometheusClient(new PrometheusConnectorConfig(), METRIC_CODEC, TYPE_MANAGER),\n new PrometheusSplit(dataUri),\n ImmutableList.of(\n ...
{ "fields": [ { "declarator": "columnHandles", "modifier": "private final", "original_string": "private final List<PrometheusColumnHandle> columnHandles;", "type": "List<PrometheusColumnHandle>", "var_name": "columnHandles" }, { "declarator": "columnTypes", "modif...
{ "body": "@Override\n public RecordCursor cursor()\n {\n return new PrometheusRecordCursor(columnHandles, byteSource);\n }", "class_method_signature": "PrometheusRecordSet.cursor()", "constructor": false, "full_signature": "@Override public RecordCursor cursor()", "identifier": "cursor", "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_795
{ "fields": [ { "declarator": "ALL_BYTES", "modifier": "private static final", "original_string": "private static final byte[] ALL_BYTES;", "type": "byte[]", "var_name": "ALL_BYTES" } ], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestVarbinaryFunctions.ja...
{ "body": "@Test\n public void testToIEEE754Binary32()\n {\n assertFunction(\"to_ieee754_32(CAST(0.0 AS REAL))\", VARBINARY, sqlVarbinaryFromHex(\"00000000\"));\n assertFunction(\"to_ieee754_32(CAST(1.0 AS REAL))\", VARBINARY, sqlVarbinaryFromHex(\"3F800000\"));\n assertFunction(\"to_ieee75...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/VarbinaryFunctions.java", "identifier": "VarbinaryFunctions", "interfaces": "", "methods": [ { "class_method_signature": "VarbinaryFunctions.VarbinaryFunctions()", "constructor": true, "full_signature": "priv...
{ "body": "@Description(\"Encode value as a big endian varbinary according to IEEE 754 single-precision floating-point format\")\n @ScalarFunction(\"to_ieee754_32\")\n @SqlType(StandardTypes.VARBINARY)\n public static Slice toIEEE754Binary32(@SqlType(StandardTypes.REAL) long value)\n {\n Slice slic...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1175
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" }, { "declarator": "executor = newCachedT...
{ "body": "@Test\n public void testStartTransactionTooManyIsolationLevels()\n {\n Session session = sessionBuilder()\n .setClientTransactionSupport()\n .build();\n TransactionManager transactionManager = createTestTransactionManager();\n QueryStateMachine state...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/StartTransactionTask.java", "identifier": "StartTransactionTask", "interfaces": "implements DataDefinitionTask<StartTransaction>", "methods": [ { "class_method_signature": "StartTransactionTask.getName()", "constructor":...
{ "body": "@Override\n public ListenableFuture<?> execute(StartTransaction statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)\n {\n Session session = stateMachine.getSession();\n if (!sessio...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_516
{ "fields": [], "file": "presto-cli/src/test/java/io/prestosql/cli/TestClientOptions.java", "identifier": "TestClientOptions", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = \"Unparseable port number: x:y\")\n public void testInvalidServer()\n {\n Console console = createConsole(\"--server=x:y\");\n console.clientOptions.toClientSession();\n }", "class_method_s...
{ "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_146
{ "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 testGetTableStatisticsEmpty()\n {\n String partitionName = \"p1=string1/p2=1234\";\n MetastoreHiveStatisticsProvider statisticsProvider = new MetastoreHiveStatisticsProvider((session, table, hivePartitions) -> ImmutableMap.of(partitionName, PartitionStatistics.empty(...
{ "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_30
{ "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 testTableRulesForCheckCanDropTable()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-table.json\");\n\n accessControl.checkCanDropTable(ADMIN, new CatalogSchemaTableName(\"some-catalog\", \"bobschema\", \"bobtable\...
{ "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 checkCanDropTable(SystemSecurityContext context, CatalogSchemaTableName table)\n {\n if (!checkTablePermission(context, table, OWNERSHIP)) {\n denyDropTable(table.toString());\n }\n }", "class_method_signature": "FileBasedSystemAccessControl.check...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_845
{ "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 testNormalCdf()\n {\n assertFunction(\"normal_cdf(0, 1, 1.96)\", DOUBLE, 0.9750021048517796);\n assertFunction(\"normal_cdf(10, 9, 10)\", DOUBLE, 0.5);\n assertFunction(\"normal_cdf(-1.5, 2.1, -7.8)\", DOUBLE, 0.0013498980316301035);\n assertFunction(\"...
{ "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(\"Normal cdf given a mean, standard deviation, and value\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double normalCdf(\n @SqlType(StandardTypes.DOUBLE) double mean,\n @SqlType(StandardTypes.DOUBLE) double standardDeviation,\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_900
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/optimizations/TestLocalProperties.java", "identifier": "TestLocalProperties", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNormalizeOverlappingSymbol()\n {\n List<LocalProperty<String>> localProperties = builder()\n .grouped(\"a\")\n .sorted(\"a\", SortOrder.ASC_NULLS_FIRST)\n .constant(\"a\")\n .build();\n assertNormalize(\...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/planner/optimizations/LocalProperties.java", "identifier": "LocalProperties", "interfaces": "", "methods": [ { "class_method_signature": "LocalProperties.LocalProperties()", "constructor": true, "full_signature": "privat...
{ "body": "public static <T> List<LocalProperty<T>> grouped(Collection<T> columns)\n {\n return ImmutableList.of(new GroupingProperty<>(columns));\n }", "class_method_signature": "LocalProperties.grouped(Collection<T> columns)", "constructor": false, "full_signature": "public static List<LocalPrope...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_453
{ "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 testDivide()\n {\n // simple cases\n assertDivideAllSigns(\"0\", \"10\");\n assertDivideAllSigns(\"5\", \"10\");\n assertDivideAllSigns(\"50\", \"100\");\n assertDivideAllSigns(\"99\", \"10\");\n assertDivideAllSigns(\"95\", \"10\");\n ...
{ "fields": [ { "declarator": "NUMBER_OF_LONGS = 2", "modifier": "private static final", "original_string": "private static final int NUMBER_OF_LONGS = 2;", "type": "int", "var_name": "NUMBER_OF_LONGS" }, { "declarator": "NUMBER_OF_INTS = 2 * NUMBER_OF_LONGS", "mo...
{ "body": "static void divide(Slice dividend, int dividendScaleFactor, Slice divisor, int divisorScaleFactor, Slice quotient, Slice remainder)\n {\n divide(getRawLong(dividend, 0), getRawLong(dividend, 1), dividendScaleFactor, getRawLong(divisor, 0), getRawLong(divisor, 1), divisorScaleFactor, quotient, rem...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_214
{ "fields": [], "file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/backup/TestFileBackupStore.java", "identifier": "TestFileBackupStore", "interfaces": "", "superclass": "extends AbstractTestBackupStore<FileBackupStore>" }
{ "body": "@Test\n public void testFilePaths()\n {\n UUID uuid = UUID.fromString(\"701e1a79-74f7-4f56-b438-b41e8e7d019d\");\n File expected = new File(temporary, format(\"backup/70/1e/%s.orc\", uuid));\n assertEquals(store.getBackupFile(uuid), expected);\n }", "class_method_signature":...
{ "fields": [ { "declarator": "baseDir", "modifier": "private final", "original_string": "private final File baseDir;", "type": "File", "var_name": "baseDir" } ], "file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/backup/FileBackupStore.java", "id...
{ "body": "@VisibleForTesting\n public File getBackupFile(UUID uuid)\n {\n return getFileSystemPath(baseDir, uuid);\n }", "class_method_signature": "FileBackupStore.getBackupFile(UUID uuid)", "constructor": false, "full_signature": "@VisibleForTesting public File getBackupFile(UUID uuid)", "id...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_644
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestBigintOperators.java", "identifier": "TestBigintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSubtract()\n {\n assertFunction(\"100000000037 - 37\", BIGINT, 100000000037L - 37L);\n assertFunction(\"37 - 100000000017\", BIGINT, 37 - 100000000017L);\n assertFunction(\"100000000017 - 37\", BIGINT, 100000000017L - 37L);\n assertFunction(\"100000...
{ "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(SUBTRACT)\n @SqlType(StandardTypes.BIGINT)\n public static long subtract(@SqlType(StandardTypes.BIGINT) long left, @SqlType(StandardTypes.BIGINT) long right)\n {\n try {\n return Math.subtractExact(left, right);\n }\n catch (ArithmeticException e) {\...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_351
{ "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 testGetSuperTypes()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getSuperTypes(null, null, null)) {\n assertFalse(rs.next());\n }\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 getSuperTypes(String catalog, String schemaPattern, String typeNamePattern)\n throws SQLException\n {\n return selectEmpty(\"\" +\n \"SELECT TYPE_CAT, TYPE_SCHEM, TYPE_NAME,\\n\" +\n \" SUPERTYPE_CAT, SUPERTYPE_SCHEM, SUPER...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_701
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestRealOperators.java", "identifier": "TestRealOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToSmallint()\n {\n assertFunction(\"CAST(REAL'754.2008' AS SMALLINT)\", SMALLINT, (short) 754);\n assertFunction(\"CAST(REAL'-754.1985' AS SMALLINT)\", SMALLINT, (short) -754);\n assertFunction(\"CAST(REAL'9.99' AS SMALLINT)\", SMALLINT, (short) 10);\n...
{ "fields": [ { "declarator": "MIN_LONG_AS_FLOAT = -0x1p63f", "modifier": "private static final", "original_string": "private static final float MIN_LONG_AS_FLOAT = -0x1p63f;", "type": "float", "var_name": "MIN_LONG_AS_FLOAT" }, { "declarator": "MAX_LONG_PLUS_ONE_AS_FLO...
{ "body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.SMALLINT)\n public static long castToSmallint(@SqlType(StandardTypes.REAL) long value)\n {\n float floatValue = intBitsToFloat((int) value);\n if (Float.isNaN(floatValue)) {\n throw new PrestoException(INVALID_CAST_ARGUMENT, \...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_428
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/TestPage.java", "identifier": "TestPage", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetRegion()\n {\n assertEquals(new Page(10).getRegion(5, 5).getPositionCount(), 5);\n }", "class_method_signature": "TestPage.testGetRegion()", "constructor": false, "full_signature": "@Test public void testGetRegion()", "identifier": "testGetRegion", "invo...
{ "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 getRegion(int positionOffset, int length)\n {\n if (positionOffset < 0 || length < 0 || positionOffset + length > positionCount) {\n throw new IndexOutOfBoundsException(format(\"Invalid position %s and length %s in page with %s positions\", positionOffset, length, positionC...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_582
{ "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 getColumnMetadata()\n {\n assertEquals(\n metadata.getColumnMetadata(SESSION, tableHandle, new JdbcColumnHandle(\"text\", JDBC_VARCHAR, VARCHAR)),\n new ColumnMetadata(\"text\", VARCHAR));\n }", "class_method_signature": "TestJdbcMetadata....
{ "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 ColumnMetadata getColumnMetadata(ConnectorSession session, ConnectorTableHandle tableHandle, ColumnHandle columnHandle)\n {\n return ((JdbcColumnHandle) columnHandle).getColumnMetadata();\n }", "class_method_signature": "JdbcMetadata.getColumnMetadata(ConnectorSession s...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_994
{ "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 testInnerJoinWithFalseFilter()\n {\n Map<Symbol, ColumnHandle> leftAssignments = Maps.filterKeys(scanAssignments, Predicates.in(ImmutableList.of(A, B, C)));\n TableScanNode leftScan = tableScanNode(leftAssignments);\n\n Map<Symbol, ColumnHandle> rightAssignmen...
{ "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_1227
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/execution/scheduler/TestPartitionedOutputBufferManager.java", "identifier": "TestPartitionedOutputBufferManager", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test()\n {\n AtomicReference<OutputBuffers> outputBufferTarget = new AtomicReference<>();\n\n PartitionedOutputBufferManager hashOutputBufferManager = new PartitionedOutputBufferManager(FIXED_HASH_DISTRIBUTION, 4, outputBufferTarget::set);\n\n // output buffer...
{ "fields": [ { "declarator": "outputBuffers", "modifier": "private final", "original_string": "private final Map<OutputBufferId, Integer> outputBuffers;", "type": "Map<OutputBufferId, Integer>", "var_name": "outputBuffers" } ], "file": "presto-main/src/main/java/io/prestosql...
{ "body": "@Override\n public void addOutputBuffers(List<OutputBufferId> newBuffers, boolean noMoreBuffers)\n {\n // All buffers are created in the constructor, so just validate that this isn't\n // a request to add a new buffer\n for (OutputBufferId newBuffer : newBuffers) {\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_1159
{ "fields": [ { "declarator": "metadata = createTestMetadataManager()", "modifier": "private final", "original_string": "private final Metadata metadata = createTestMetadataManager();", "type": "Metadata", "var_name": "metadata" }, { "declarator": "executor = newCachedT...
{ "body": "@Test\n public void testRollback()\n {\n TransactionManager transactionManager = createTestTransactionManager();\n\n Session session = sessionBuilder()\n .setTransactionId(transactionManager.beginTransaction(false))\n .build();\n QueryStateMachine st...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/RollbackTask.java", "identifier": "RollbackTask", "interfaces": "implements DataDefinitionTask<Rollback>", "methods": [ { "class_method_signature": "RollbackTask.getName()", "constructor": false, "full_signature": ...
{ "body": "@Override\n public ListenableFuture<?> execute(Rollback statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)\n {\n Session session = stateMachine.getSession();\n if (session.getTran...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_613
{ "fields": [ { "declarator": "lowMemoryKiller = new TotalReservationLowMemoryKiller()", "modifier": "private final", "original_string": "private final LowMemoryKiller lowMemoryKiller = new TotalReservationLowMemoryKiller();", "type": "LowMemoryKiller", "var_name": "lowMemoryKiller" ...
{ "body": "@Test\n public void testGeneralPoolHasNoReservation()\n {\n int reservePool = 10;\n int generalPool = 12;\n Map<String, Map<String, Long>> queries = ImmutableMap.<String, Map<String, Long>>builder()\n .put(\"q_1\", ImmutableMap.of(\"n1\", 0L, \"n2\", 0L, \"n3\", 0L...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/memory/TotalReservationLowMemoryKiller.java", "identifier": "TotalReservationLowMemoryKiller", "interfaces": "implements LowMemoryKiller", "methods": [ { "class_method_signature": "TotalReservationLowMemoryKiller.chooseQueryToKill(List<...
{ "body": "@Override\n public Optional<QueryId> chooseQueryToKill(List<QueryMemoryInfo> runningQueries, List<MemoryInfo> nodes)\n {\n QueryId biggestQuery = null;\n long maxMemory = 0;\n for (QueryMemoryInfo query : runningQueries) {\n long bytesUsed = query.getMemoryReservation(...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_243
{ "fields": [ { "declarator": "METADATA_CODEC = jsonCodec(OrcFileMetadata.class)", "modifier": "private static final", "original_string": "private static final JsonCodec<OrcFileMetadata> METADATA_CODEC = jsonCodec(OrcFileMetadata.class);", "type": "JsonCodec<OrcFileMetadata>", "var_n...
{ "body": "@Test\n public void testRewrite()\n throws Exception\n {\n ArrayType arrayType = new ArrayType(BIGINT);\n ArrayType arrayOfArrayType = new ArrayType(arrayType);\n Type mapType = createTestMetadataManager().getParameterizedType(StandardTypes.MAP, ImmutableList.of(\n ...
{ "fields": [ { "declarator": "log = Logger.get(OrcFileRewriter.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(OrcFileRewriter.class);", "type": "Logger", "var_name": "log" }, { "declarator": "CONFIGURATION ...
{ "body": "public static OrcFileInfo rewrite(File input, File output, BitSet rowsToDelete)\n throws IOException\n {\n try (FileSystem fileSystem = new SyncingFileSystem(CONFIGURATION)) {\n Reader reader = createReader(fileSystem, path(input));\n\n if (reader.getNumberOfRows(...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_756
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/index/TestFieldSetFilteringRecordSet.java", "identifier": "TestFieldSetFilteringRecordSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test()\n {\n ArrayType arrayOfBigintType = new ArrayType(BIGINT);\n FieldSetFilteringRecordSet fieldSetFilteringRecordSet = new FieldSetFilteringRecordSet(\n new TypeOperators(),\n new InMemoryRecordSet(\n Immutabl...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final RecordSet delegate;", "type": "RecordSet", "var_name": "delegate" }, { "declarator": "fieldSets", "modifier": "private final", "original_string": "privat...
{ "body": "@Override\n public RecordCursor cursor()\n {\n return new FieldSetFilteringRecordCursor(delegate.cursor(), fieldSets);\n }", "class_method_signature": "FieldSetFilteringRecordSet.cursor()", "constructor": false, "full_signature": "@Override public RecordCursor cursor()", "identifier...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_306
{ "fields": [], "file": "presto-kafka/src/test/java/io/prestosql/plugin/kafka/TestKafkaFilterManager.java", "identifier": "TestKafkaFilterManager", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFilterValuesByDomain()\n {\n Set<Long> source = Set.of(1L, 2L, 3L, 4L, 5L, 6L);\n\n Domain testDomain = Domain.singleValue(BIGINT, 1L);\n assertEquals(KafkaFilterManager.filterValuesByDomain(testDomain, source), Set.of(1L));\n\n testDomain = multipl...
{ "fields": [ { "declarator": "INVALID_KAFKA_RANGE_INDEX = -1", "modifier": "private static final", "original_string": "private static final long INVALID_KAFKA_RANGE_INDEX = -1;", "type": "long", "var_name": "INVALID_KAFKA_RANGE_INDEX" }, { "declarator": "TOPIC_CONFIG_T...
{ "body": "@VisibleForTesting\n public static Set<Long> filterValuesByDomain(Domain domain, Set<Long> sourceValues)\n {\n requireNonNull(sourceValues, \"sourceValues is none\");\n if (domain.isSingleValue()) {\n long singleValue = (long) domain.getSingleValue();\n return sour...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_185
{ "fields": [ { "declarator": "TEST_COLUMN_HANDLE = createBaseColumn(\n \"test\",\n 0,\n HiveType.HIVE_STRING,\n VARCHAR,\n HiveColumnHandle.ColumnType.PARTITION_KEY,\n Optional.empty())", "modifier": "private static final", "orig...
{ "body": "@Test\n public void testCreatePredicateWithNaNAndNull()\n {\n HiveColumnHandle columnHandle = DOUBLE_COLUMN_HANDLE;\n ImmutableList.Builder<HivePartition> partitions = ImmutableList.builder();\n\n partitions.add(new HivePartition(\n new SchemaTableName(\"test\", \"...
{ "fields": [ { "declarator": "PRESTO_VERSION_NAME = \"presto_version\"", "modifier": "public static final", "original_string": "public static final String PRESTO_VERSION_NAME = \"presto_version\";", "type": "String", "var_name": "PRESTO_VERSION_NAME" }, { "declarator":...
{ "body": "@VisibleForTesting\n static TupleDomain<ColumnHandle> createPredicate(List<ColumnHandle> partitionColumns, List<HivePartition> partitions)\n {\n if (partitions.isEmpty()) {\n return TupleDomain.none();\n }\n\n return withColumnDomains(\n partitionColumns...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_886
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestUrlFunctions.java", "identifier": "TestUrlFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testUrlEncode()\n {\n String[][] outputInputPairs = {\n {\"http%3A%2F%2Ftest\", \"http://test\"},\n {\"http%3A%2F%2Ftest%3Fa%3Db%26c%3Dd\", \"http://test?a=b&c=d\"},\n {\"http%3A%2F%2F%E3%83%86%E3%82%B9%E3%83%88\", \"http://\\u30...
{ "fields": [ { "declarator": "QUERY_SPLITTER = Splitter.on('&')", "modifier": "private static final", "original_string": "private static final Splitter QUERY_SPLITTER = Splitter.on('&');", "type": "Splitter", "var_name": "QUERY_SPLITTER" }, { "declarator": "ARG_SPLITTE...
{ "body": "@Description(\"Escape a string for use in URL query parameter names and values\")\n @ScalarFunction\n @LiteralParameters({\"x\", \"y\"})\n @Constraint(variable = \"y\", expression = \"min(2147483647, x * 12)\")\n @SqlType(\"varchar(y)\")\n public static Slice urlEncode(@SqlType(\"varchar(x)\...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1270
{ "fields": [], "file": "presto-accumulo/src/test/java/io/prestosql/plugin/accumulo/model/TestRow.java", "identifier": "TestRow", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRow()\n {\n Row r1 = new Row();\n r1.addField(new Field(AccumuloRowSerializer.getBlockFromArray(VARCHAR, ImmutableList.of(\"a\", \"b\", \"c\")), new ArrayType(VARCHAR)));\n r1.addField(true, BOOLEAN);\n r1.addField(new Field(10592L, DATE));\n ...
{ "fields": [ { "declarator": "fields = new ArrayList<>()", "modifier": "private final", "original_string": "private final List<Field> fields = new ArrayList<>();", "type": "List<Field>", "var_name": "fields" } ], "file": "presto-accumulo/src/main/java/io/prestosql/plugin/acc...
{ "body": "public Row() {}", "class_method_signature": "Row.Row()", "constructor": true, "full_signature": "public Row()", "identifier": "Row", "invocations": [], "modifiers": "public", "parameters": "()", "return": "", "signature": " Row()", "testcase": 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_869
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testLeftTrim()\n {\n assertFunction(\"LTRIM('')\", createVarcharType(0), \"\");\n assertFunction(\"LTRIM(' ')\", createVarcharType(3), \"\");\n assertFunction(\"LTRIM(' hello ')\", createVarcharType(9), \"hello \");\n assertFunction(\"LTRIM(' hell...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java", "identifier": "StringFunctions", "interfaces": "", "methods": [ { "class_method_signature": "StringFunctions.StringFunctions()", "constructor": true, "full_signature": "private StringF...
{ "body": "@Description(\"Removes whitespace from the beginning of a string\")\n @ScalarFunction(\"ltrim\")\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice leftTrim(@SqlType(\"varchar(x)\") Slice slice)\n {\n return SliceUtf8.leftTrim(slice);\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_490
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestDomain.java", "identifier": "TestDomain", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testUncomparableSingleValue()\n {\n Domain.singleValue(HYPER_LOG_LOG, Slices.EMPTY_SLICE);\n }", "class_method_signature": "TestDomain.testUncomparableSingleValue()", "constructor": false, "full_signature": "@Tes...
{ "fields": [ { "declarator": "DEFAULT_COMPACTION_THRESHOLD = 32", "modifier": "public static final", "original_string": "public static final int DEFAULT_COMPACTION_THRESHOLD = 32;", "type": "int", "var_name": "DEFAULT_COMPACTION_THRESHOLD" }, { "declarator": "values", ...
{ "body": "public static Domain singleValue(Type type, Object value)\n {\n return new Domain(ValueSet.of(type, value), false);\n }", "class_method_signature": "Domain.singleValue(Type type, Object value)", "constructor": false, "full_signature": "public static Domain singleValue(Type type, Object 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_255
{ "fields": [ { "declarator": "MAX_SHARD_ROWS = 100", "modifier": "private static final", "original_string": "private static final long MAX_SHARD_ROWS = 100;", "type": "long", "var_name": "MAX_SHARD_ROWS" }, { "declarator": "MAX_SHARD_SIZE = DataSize.ofBytes(100)", ...
{ "body": "@Test\n public void testNonTemporalRowCountBasedOrganizationSet()\n {\n List<ShardIndexInfo> inputShards = ImmutableList.of(\n shardWithSize(50, 10),\n shardWithSize(100, 10),\n shardWithSize(20, 10),\n shardWithSize(30, 10));\n\n ...
{ "fields": [ { "declarator": "maxShardSize", "modifier": "private final", "original_string": "private final DataSize maxShardSize;", "type": "DataSize", "var_name": "maxShardSize" }, { "declarator": "maxShardRows", "modifier": "private final", "original_str...
{ "body": "public Set<OrganizationSet> createCompactionSets(Table tableInfo, Collection<ShardIndexInfo> shards)\n {\n Collection<Collection<ShardIndexInfo>> shardsByDaysBuckets = getShardsByDaysBuckets(tableInfo, shards);\n\n ImmutableSet.Builder<OrganizationSet> compactionSets = ImmutableSet.builder...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_605
{ "fields": [ { "declarator": "COL1 = new MongoColumnHandle(\"col1\", BIGINT, false)", "modifier": "private static final", "original_string": "private static final MongoColumnHandle COL1 = new MongoColumnHandle(\"col1\", BIGINT, false);", "type": "MongoColumnHandle", "var_name": "COL...
{ "body": "@Test\n public void testBuildQueryNull()\n {\n TupleDomain<ColumnHandle> tupleDomain = TupleDomain.withColumnDomains(ImmutableMap.of(\n COL1, Domain.create(ValueSet.ofRanges(greaterThan(BIGINT, 200L)), true)));\n\n Document query = MongoSession.buildQuery(tupleDomain);\n ...
{ "fields": [ { "declarator": "log = Logger.get(MongoSession.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(MongoSession.class);", "type": "Logger", "var_name": "log" }, { "declarator": "SYSTEM_TABLES = Arra...
{ "body": "@VisibleForTesting\n static Document buildQuery(TupleDomain<ColumnHandle> tupleDomain)\n {\n Document query = new Document();\n if (tupleDomain.getDomains().isPresent()) {\n for (Map.Entry<ColumnHandle, Domain> entry : tupleDomain.getDomains().get().entrySet()) {\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_310
{ "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 testHiddenSchemas()\n {\n assertTrue(tpchMetadata.schemaExists(session, \"sf1\"));\n assertTrue(tpchMetadata.schemaExists(session, \"sf3000.0\"));\n assertFalse(tpchMetadata.schemaExists(session, \"sf0\"));\n assertFalse(tpchMetadata.schemaExists(sessio...
{ "fields": [ { "declarator": "TINY_SCHEMA_NAME = \"tiny\"", "modifier": "public static final", "original_string": "public static final String TINY_SCHEMA_NAME = \"tiny\";", "type": "String", "var_name": "TINY_SCHEMA_NAME" }, { "declarator": "TINY_SCALE_FACTOR = 0.01", ...
{ "body": "@Override\n public boolean schemaExists(ConnectorSession session, String schemaName)\n {\n return schemaNameToScaleFactor(schemaName) > 0;\n }", "class_method_signature": "TpchMetadata.schemaExists(ConnectorSession session, String schemaName)", "constructor": false, "full_signature": ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_740
{ "fields": [ { "declarator": "valueStore", "modifier": "private", "original_string": "private ValueStore valueStore;", "type": "ValueStore", "var_name": "valueStore" }, { "declarator": "block", "modifier": "private", "original_string": "private Block block;...
{ "body": "@Test\n public void testUniqueness()\n {\n assertEquals(valueStore.addAndGetPosition(block, 0, hashCodeOperator.hashCode(block, 0)), 0);\n assertEquals(valueStore.addAndGetPosition(block, 1, hashCodeOperator.hashCode(block, 1)), 1);\n assertEquals(valueStore.addAndGetPosition(blo...
{ "fields": [ { "declarator": "INSTANCE_SIZE = ClassLayout.parseClass(GroupedTypedHistogram.class).instanceSize()", "modifier": "private static final", "original_string": "private static final int INSTANCE_SIZE = ClassLayout.parseClass(GroupedTypedHistogram.class).instanceSize();", "type":...
{ "body": "public int addAndGetPosition(Block block, int position, long valueHash)\n {\n if (values.getPositionCount() >= maxFill) {\n rehash();\n }\n\n int bucketId = getBucketId(valueHash, mask);\n int valuePointer;\n\n // look for an empty slot or a slot containing ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_890
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestColorFunctions.java", "identifier": "TestColorFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testParseRgb()\n {\n assertEquals(parseRgb(toSlice(\"#000\")), 0x00_00_00);\n assertEquals(parseRgb(toSlice(\"#FFF\")), 0xFF_FF_FF);\n assertEquals(parseRgb(toSlice(\"#F00\")), 0xFF_00_00);\n assertEquals(parseRgb(toSlice(\"#0F0\")), 0x00_FF_00);\n ...
{ "fields": [ { "declarator": "ANSI_RESET = \"\\u001b[0m\"", "modifier": "private static final", "original_string": "private static final String ANSI_RESET = \"\\u001b[0m\";", "type": "String", "var_name": "ANSI_RESET" }, { "declarator": "RENDERED_TRUE = render(utf8Slic...
{ "body": "@VisibleForTesting\n static int parseRgb(Slice color)\n {\n if (color.length() != 4 || color.getByte(0) != '#') {\n return -1;\n }\n\n int red = Character.digit((char) color.getByte(1), 16);\n int green = Character.digit((char) color.getByte(2), 16);\n in...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_193
{ "fields": [ { "declarator": "forReal", "modifier": "private", "original_string": "private boolean forReal;", "type": "boolean", "var_name": "forReal" }, { "declarator": "successResponse = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><soapenv:Envelope xmlns:soap...
{ "body": "@Test(expectedExceptions = AccessDeniedException.class)\n public void createAuthenticatedPrincipalBadPass()\n {\n String org = \"my18CharOrgId\"; // As if from salesforce.allowed-organizations property.\n String username = \"user@salesforce.com\";\n String password = \"passtoken...
{ "fields": [ { "declarator": "log = Logger.get(SalesforceBasicAuthenticator.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(SalesforceBasicAuthenticator.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@Override\n public Principal createAuthenticatedPrincipal(String username, String password)\n {\n try {\n return userCache.getUnchecked(new Credential(username, password));\n }\n catch (UncheckedExecutionException e) {\n throwIfInstanceOf(e.getCause(), Acces...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_469
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestEquatableValueSet.java", "identifier": "TestEquatableValueSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetSingleValue()\n {\n assertEquals(EquatableValueSet.of(ID, 0L).getSingleValue(), 0L);\n try {\n EquatableValueSet.all(ID).getSingleValue();\n fail();\n }\n catch (IllegalStateException ignored) {\n }\n }", "class_...
{ "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 Object getSingleValue()\n {\n if (!isSingleValue()) {\n throw new IllegalStateException(\"EquatableValueSet does not have just a single value\");\n }\n return entries.iterator().next().getValue();\n }", "class_method_signature": "EquatableValueS...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_486
{ "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 testIsNone()\n {\n assertFalse(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of()).isNone());\n assertFalse(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))).isNone());\n assertTrue(TupleDomain.withColumnDomai...
{ "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 boolean isNone()\n {\n return domains.isEmpty();\n }", "class_method_signature": "TupleDomain.isNone()", "constructor": false, "full_signature": "public boolean isNone()", "identifier": "isNone", "invocations": [ "isEmpty" ], "modifiers": "public", "parameters": "()"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1266
{ "fields": [], "file": "presto-bigquery/src/test/java/io/prestosql/plugin/bigquery/TestBigQueryConnectorModule.java", "identifier": "TestBigQueryConnectorModule", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCredentialsOnly()\n throws Exception\n {\n String projectId = BigQueryConnectorModule.calculateBillingProjectId(Optional.empty(), credentials());\n assertThat(projectId).isEqualTo(\"presto-bq-credentials-test\");\n }", "class_method_signature": "T...
{ "fields": [ { "declarator": "nodeManager", "modifier": "private final", "original_string": "private final NodeManager nodeManager;", "type": "NodeManager", "var_name": "nodeManager" } ], "file": "presto-bigquery/src/main/java/io/prestosql/plugin/bigquery/BigQueryConnectorMo...
{ "body": "static String calculateBillingProjectId(Optional<String> configParentProjectId, Optional<Credentials> credentials)\n {\n // 1. Get from configuration\n if (configParentProjectId.isPresent()) {\n return configParentProjectId.get();\n }\n // 2. Get from the provided ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1118
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/server/ui/TestWebUiConfig.java", "identifier": "TestWebUiConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(WebUiConfig.class)\n .setEnabled(true));\n }", "class_method_signature": "TestWebUiConfig.testDefaults()", "constructor": false, "full_signature": "@Test public void testDefaults()", "ident...
{ "fields": [ { "declarator": "enabled = true", "modifier": "private", "original_string": "private boolean enabled = true;", "type": "boolean", "var_name": "enabled" } ], "file": "presto-main/src/main/java/io/prestosql/server/ui/WebUiConfig.java", "identifier": "WebUiConfig...
{ "body": "@Config(\"web-ui.enabled\")\n public WebUiConfig setEnabled(boolean enabled)\n {\n this.enabled = enabled;\n return this;\n }", "class_method_signature": "WebUiConfig.setEnabled(boolean enabled)", "constructor": false, "full_signature": "@Config(\"web-ui.enabled\") public WebUi...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_652
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestSingleAccessMethodCompiler.java", "identifier": "TestSingleAccessMethodCompiler", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGeneric()\n throws ReflectiveOperationException\n {\n @SuppressWarnings(\"unchecked\")\n LongFunction<String> print = (LongFunction<String>) compileSingleAccessMethod(\n \"Print\",\n LongFunction.class,\n lo...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/SingleAccessMethodCompiler.java", "identifier": "SingleAccessMethodCompiler", "interfaces": "", "methods": [ { "class_method_signature": "SingleAccessMethodCompiler.SingleAccessMethodCompiler()", "constructor": true, "f...
{ "body": "public static <T> T compileSingleAccessMethod(String suggestedClassName, Class<T> interfaceType, MethodHandle methodHandle)\n {\n ClassDefinition classDefinition = new ClassDefinition(\n a(PUBLIC, FINAL, SYNTHETIC),\n makeClassName(suggestedClassName),\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_202
{ "fields": [], "file": "presto-password-authenticators/src/test/java/io/prestosql/plugin/password/file/TestEncryptionUtil.java", "identifier": "TestEncryptionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testHashingAlgorithmPBKDF2()\n {\n String password = \"1000:5b4240333032306164:f38d165fce8ce42f59d366139ef5d9e1ca1247f0e06e503ee1a611dd9ec40876bb5edb8409f5abe5504aab6628e70cfb3d3a18e99d70357d295002c3d0a308a0\";\n assertEquals(getHashingAlgorithm(password), PBKDF2);\n...
{ "fields": [ { "declarator": "BCRYPT_MIN_COST = 8", "modifier": "private static final", "original_string": "private static final int BCRYPT_MIN_COST = 8;", "type": "int", "var_name": "BCRYPT_MIN_COST" }, { "declarator": "PBKDF2_MIN_ITERATIONS = 1000", "modifier":...
{ "body": "public static HashingAlgorithm getHashingAlgorithm(String password)\n {\n if (password.startsWith(\"$2y\")) {\n if (getBCryptCost(password) < BCRYPT_MIN_COST) {\n throw new HashedPasswordException(\"Minimum cost of BCrypt password must be \" + BCRYPT_MIN_COST);\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_717
{ "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 testSetsHiddenToTrueForOperators()\n {\n Signature signature = Signature.builder()\n .operatorType(ADD)\n .returnType(new TypeSignature(\"varchar\", typeVariable(\"x\")))\n .argumentTypes(new TypeSignature(\"varchar\", typeVariab...
{ "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_347
{ "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 testGetProcedureColumns()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getProcedureColumns(null, null, null, null)) {\n assertFalse(rs.next());\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 getProcedureColumns(String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern)\n throws SQLException\n {\n return selectEmpty(\"\" +\n \"SELECT PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME, \" +\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_594
{ "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 testInsertOverwriteIsSetToErrorWhenImmutablePartitionsIsTrue()\n {\n Plugin plugin = new HiveHadoop2Plugin();\n ConnectorFactory connectorFactory = Iterables.getOnlyElement(plugin.getConnectorFactories());\n\n Connector connector = 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_1231
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/eventlistener/TestEventListenerConfig.java", "identifier": "TestEventListenerConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExplicitPropertyMappings()\n throws IOException\n {\n Path config1 = Files.createTempFile(null, null);\n Path config2 = Files.createTempFile(null, null);\n\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n ...
{ "fields": [ { "declarator": "SPLITTER = Splitter.on(',').trimResults().omitEmptyStrings()", "modifier": "private static final", "original_string": "private static final Splitter SPLITTER = Splitter.on(',').trimResults().omitEmptyStrings();", "type": "Splitter", "var_name": "SPLITTE...
{ "body": "@Config(\"event-listener.config-files\")\n public EventListenerConfig setEventListenerFiles(String eventListenerFiles)\n {\n this.eventListenerFiles = SPLITTER.splitToList(eventListenerFiles).stream()\n .map(File::new)\n .collect(toImmutableList());\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_828
{ "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 testIsInfinite()\n {\n assertFunction(\"is_infinite(1.0E0 / 0.0E0)\", BOOLEAN, true);\n assertFunction(\"is_infinite(0.0E0 / 0.0E0)\", BOOLEAN, false);\n assertFunction(\"is_infinite(1.0E0 / 1.0E0)\", BOOLEAN, false);\n assertFunction(\"is_infinite(REAL...
{ "fields": [ { "declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()", "modifier": "public static final", "original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();", "type": "SqlScalarFunction", "var_name": "DECIMAL_MOD_FUNCTION" ...
{ "body": "@Description(\"Test if value is infinite\")\n @ScalarFunction\n @SqlType(StandardTypes.BOOLEAN)\n public static boolean isInfinite(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Double.isInfinite(num);\n }", "class_method_signature": "MathFunctions.isInfinite(@SqlType(Stand...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_982
{ "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 testFilter()\n {\n PlanNode node = filter(\n baseTableScan,\n and(\n greaterThan(\n AE,\n new FunctionCallBuilder(metadata)\n ...
{ "fields": [ { "declarator": "SYMBOL_MATCHES_EXPRESSION =\n entry -> entry.getValue().equals(entry.getKey().toSymbolReference())", "modifier": "private static final", "original_string": "private static final Predicate<Map.Entry<Symbol, ? extends Expression>> SYMBOL_MATCHES_EXPRESSION...
{ "body": "public Expression extract(Session session, PlanNode node, TypeProvider types, TypeAnalyzer typeAnalyzer)\n {\n return node.accept(new Visitor(domainTranslator, metadata, session, types, typeAnalyzer, useTableProperties), null);\n }", "class_method_signature": "EffectivePredicateExtractor.ext...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_595
{ "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 testInsertOverwriteIsSetToAppendWhenImmutablePartitionsIsFalseByDefault()\n {\n Plugin plugin = new HiveHadoop2Plugin();\n ConnectorFactory connectorFactory = Iterables.getOnlyElement(plugin.getConnectorFactories());\n\n Connector connector = connectorFactory....
{ "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_1230
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/eventlistener/TestEventListenerConfig.java", "identifier": "TestEventListenerConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(ConfigAssertions.recordDefaults(EventListenerConfig.class)\n .setEventListenerFiles(\"\"));\n }", "class_method_signature": "TestEventListenerConfig.testDefaults()", "constructor": false, "full_signature": ...
{ "fields": [ { "declarator": "SPLITTER = Splitter.on(',').trimResults().omitEmptyStrings()", "modifier": "private static final", "original_string": "private static final Splitter SPLITTER = Splitter.on(',').trimResults().omitEmptyStrings();", "type": "Splitter", "var_name": "SPLITTE...
{ "body": "@Config(\"event-listener.config-files\")\n public EventListenerConfig setEventListenerFiles(String eventListenerFiles)\n {\n this.eventListenerFiles = SPLITTER.splitToList(eventListenerFiles).stream()\n .map(File::new)\n .collect(toImmutableList());\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_829
{ "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 testIsFinite()\n {\n assertFunction(\"is_finite(100000)\", BOOLEAN, true);\n assertFunction(\"is_finite(rand() / 0.0E0)\", BOOLEAN, false);\n assertFunction(\"is_finite(REAL '754.2008E0')\", BOOLEAN, true);\n assertFunction(\"is_finite(rand() / REAL '0....
{ "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 finite\")\n @ScalarFunction\n @SqlType(StandardTypes.BOOLEAN)\n public static boolean isFinite(@SqlType(StandardTypes.DOUBLE) double num)\n {\n return Doubles.isFinite(num);\n }", "class_method_signature": "MathFunctions.isFinite(@SqlType(StandardType...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_983
{ "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 testProject()\n {\n PlanNode node = new ProjectNode(\n newId(),\n filter(\n baseTableScan,\n and(\n equals(AE, BE),\n equals(BE, CE),\n ...
{ "fields": [ { "declarator": "SYMBOL_MATCHES_EXPRESSION =\n entry -> entry.getValue().equals(entry.getKey().toSymbolReference())", "modifier": "private static final", "original_string": "private static final Predicate<Map.Entry<Symbol, ? extends Expression>> SYMBOL_MATCHES_EXPRESSION...
{ "body": "public Expression extract(Session session, PlanNode node, TypeProvider types, TypeAnalyzer typeAnalyzer)\n {\n return node.accept(new Visitor(domainTranslator, metadata, session, types, typeAnalyzer, useTableProperties), null);\n }", "class_method_signature": "EffectivePredicateExtractor.ext...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1119
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/server/ui/TestWebUiConfig.java", "identifier": "TestWebUiConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"web-ui.enabled\", \"false\")\n .build();\n\n WebUiConfig expected = new WebUiConfig()\n .setEnabled(...
{ "fields": [ { "declarator": "enabled = true", "modifier": "private", "original_string": "private boolean enabled = true;", "type": "boolean", "var_name": "enabled" } ], "file": "presto-main/src/main/java/io/prestosql/server/ui/WebUiConfig.java", "identifier": "WebUiConfig...
{ "body": "@Config(\"web-ui.enabled\")\n public WebUiConfig setEnabled(boolean enabled)\n {\n this.enabled = enabled;\n return this;\n }", "class_method_signature": "WebUiConfig.setEnabled(boolean enabled)", "constructor": false, "full_signature": "@Config(\"web-ui.enabled\") public WebUi...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_653
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestTinyintOperators.java", "identifier": "TestTinyintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testAdd()\n {\n assertFunction(\"TINYINT'37' + TINYINT'37'\", TINYINT, (byte) (37 + 37));\n assertFunction(\"TINYINT'37' + TINYINT'17'\", TINYINT, (byte) (37 + 17));\n assertFunction(\"TINYINT'17' + TINYINT'37'\", TINYINT, (byte) (17 + 37));\n assertFun...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/TinyintOperators.java", "identifier": "TinyintOperators", "interfaces": "", "methods": [ { "class_method_signature": "TinyintOperators.TinyintOperators()", "constructor": true, "full_signature": "private TinyintOperato...
{ "body": "@ScalarOperator(ADD)\n @SqlType(StandardTypes.TINYINT)\n public static long add(@SqlType(StandardTypes.TINYINT) long left, @SqlType(StandardTypes.TINYINT) long right)\n {\n try {\n return SignedBytes.checkedCast(left + right);\n }\n catch (IllegalArgumentException e...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_203
{ "fields": [], "file": "presto-password-authenticators/src/test/java/io/prestosql/plugin/password/file/TestEncryptionUtil.java", "identifier": "TestEncryptionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMinBCryptCost()\n {\n // BCrypt password created with cost of 7 --> \"htpasswd -n -B -C 7 test\"\n String password = \"$2y$07$XxMSjoWesbX9s9LCD5Kp1OaFD/bcLUq0zoRCTsTNwjF6N/nwHVCVm\";\n assertThatThrownBy(() -> getHashingAlgorithm(password))\n ...
{ "fields": [ { "declarator": "BCRYPT_MIN_COST = 8", "modifier": "private static final", "original_string": "private static final int BCRYPT_MIN_COST = 8;", "type": "int", "var_name": "BCRYPT_MIN_COST" }, { "declarator": "PBKDF2_MIN_ITERATIONS = 1000", "modifier":...
{ "body": "public static HashingAlgorithm getHashingAlgorithm(String password)\n {\n if (password.startsWith(\"$2y\")) {\n if (getBCryptCost(password) < BCRYPT_MIN_COST) {\n throw new HashedPasswordException(\"Minimum cost of BCrypt password must be \" + BCRYPT_MIN_COST);\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_716
{ "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 testTypeParameters()\n throws Throwable\n {\n Signature signature = Signature.builder()\n .name(\"foo\")\n .typeVariableConstraints(comparableWithVariadicBound(\"V\", \"ROW\"))\n .returnType(new TypeSignature(\"V\"))\n...
{ "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_346
{ "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 testGetProcedures()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getProcedures(null, null, null)) {\n assertFalse(rs.next());\n }\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 getProcedures(String catalog, String schemaPattern, String procedureNamePattern)\n throws SQLException\n {\n return selectEmpty(\"\" +\n \"SELECT PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME,\\n \" +\n \" null, null, null...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_891
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestColorFunctions.java", "identifier": "TestColorFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testToRgb()\n {\n assertEquals(rgb(0xFF, 0, 0), 0xFF_00_00);\n assertEquals(rgb(0, 0xFF, 0), 0x00_FF_00);\n assertEquals(rgb(0, 0, 0xFF), 0x00_00_FF);\n }", "class_method_signature": "TestColorFunctions.testToRgb()", "constructor": false, "full_signat...
{ "fields": [ { "declarator": "ANSI_RESET = \"\\u001b[0m\"", "modifier": "private static final", "original_string": "private static final String ANSI_RESET = \"\\u001b[0m\";", "type": "String", "var_name": "ANSI_RESET" }, { "declarator": "RENDERED_TRUE = render(utf8Slic...
{ "body": "@ScalarFunction\n @SqlType(ColorType.NAME)\n public static long rgb(@SqlType(StandardTypes.BIGINT) long red, @SqlType(StandardTypes.BIGINT) long green, @SqlType(StandardTypes.BIGINT) long blue)\n {\n checkCondition(red >= 0 && red <= 255, INVALID_FUNCTION_ARGUMENT, \"red must be between 0 a...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_192
{ "fields": [ { "declarator": "forReal", "modifier": "private", "original_string": "private boolean forReal;", "type": "boolean", "var_name": "forReal" }, { "declarator": "successResponse = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><soapenv:Envelope xmlns:soap...
{ "body": "@Test(expectedExceptions = AccessDeniedException.class)\n public void createAuthenticatedPrincipalWrongOrg()\n {\n String org = \"my18CharOrgId\"; // As if from ssalesforce.allowed-organizations property.\n String username = \"user@salesforce.com\";\n String password = \"passtok...
{ "fields": [ { "declarator": "log = Logger.get(SalesforceBasicAuthenticator.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(SalesforceBasicAuthenticator.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@Override\n public Principal createAuthenticatedPrincipal(String username, String password)\n {\n try {\n return userCache.getUnchecked(new Credential(username, password));\n }\n catch (UncheckedExecutionException e) {\n throwIfInstanceOf(e.getCause(), Acces...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_468
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestSortedRangeSet.java", "identifier": "TestSortedRangeSet", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUnion()\n {\n assertUnion(SortedRangeSet.none(BIGINT), SortedRangeSet.none(BIGINT), SortedRangeSet.none(BIGINT));\n assertUnion(SortedRangeSet.all(BIGINT), SortedRangeSet.all(BIGINT), SortedRangeSet.all(BIGINT));\n assertUnion(SortedRangeSet.none(BIGINT), ...
{ "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 union(ValueSet other)\n {\n SortedRangeSet otherRangeSet = checkCompatibility(other);\n return new Builder(type)\n .addAll(this.lowIndexedRanges.values())\n .addAll(otherRangeSet.lowIndexedRanges.values())\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_487
{ "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 testIsAll()\n {\n assertTrue(TupleDomain.withColumnDomains(ImmutableMap.<ColumnHandle, Domain>of()).isAll());\n assertFalse(TupleDomain.withColumnDomains(ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))).isAll());\n assertTrue(TupleDomain.withColumnDomains(I...
{ "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 boolean isAll()\n {\n return domains.isPresent() && domains.get().isEmpty();\n }", "class_method_signature": "TupleDomain.isAll()", "constructor": false, "full_signature": "public boolean isAll()", "identifier": "isAll", "invocations": [ "isPresent", "isEmpty", "ge...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1267
{ "fields": [], "file": "presto-bigquery/src/test/java/io/prestosql/plugin/bigquery/TestBigQueryConnectorModule.java", "identifier": "TestBigQueryConnectorModule", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBothConfigurationAndCredentials()\n throws Exception\n {\n String projectId = BigQueryConnectorModule.calculateBillingProjectId(Optional.of(\"pid\"), credentials());\n assertThat(projectId).isEqualTo(\"pid\");\n }", "class_method_signature": "Test...
{ "fields": [ { "declarator": "nodeManager", "modifier": "private final", "original_string": "private final NodeManager nodeManager;", "type": "NodeManager", "var_name": "nodeManager" } ], "file": "presto-bigquery/src/main/java/io/prestosql/plugin/bigquery/BigQueryConnectorMo...
{ "body": "static String calculateBillingProjectId(Optional<String> configParentProjectId, Optional<Credentials> credentials)\n {\n // 1. Get from configuration\n if (configParentProjectId.isPresent()) {\n return configParentProjectId.get();\n }\n // 2. Get from the provided ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_254
{ "fields": [ { "declarator": "MAX_SHARD_ROWS = 100", "modifier": "private static final", "original_string": "private static final long MAX_SHARD_ROWS = 100;", "type": "long", "var_name": "MAX_SHARD_ROWS" }, { "declarator": "MAX_SHARD_SIZE = DataSize.ofBytes(100)", ...
{ "body": "@Test\n public void testNonTemporalSizeBasedOrganizationSet()\n {\n List<ShardIndexInfo> inputShards = ImmutableList.of(\n shardWithSize(10, 70),\n shardWithSize(10, 20),\n shardWithSize(10, 30),\n shardWithSize(10, 120));\n\n ...
{ "fields": [ { "declarator": "maxShardSize", "modifier": "private final", "original_string": "private final DataSize maxShardSize;", "type": "DataSize", "var_name": "maxShardSize" }, { "declarator": "maxShardRows", "modifier": "private final", "original_str...
{ "body": "public Set<OrganizationSet> createCompactionSets(Table tableInfo, Collection<ShardIndexInfo> shards)\n {\n Collection<Collection<ShardIndexInfo>> shardsByDaysBuckets = getShardsByDaysBuckets(tableInfo, shards);\n\n ImmutableSet.Builder<OrganizationSet> compactionSets = ImmutableSet.builder...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_604
{ "fields": [ { "declarator": "COL1 = new MongoColumnHandle(\"col1\", BIGINT, false)", "modifier": "private static final", "original_string": "private static final MongoColumnHandle COL1 = new MongoColumnHandle(\"col1\", BIGINT, false);", "type": "MongoColumnHandle", "var_name": "COL...
{ "body": "@Test\n public void testBuildQueryOr()\n {\n TupleDomain<ColumnHandle> tupleDomain = TupleDomain.withColumnDomains(ImmutableMap.of(\n COL1, Domain.create(ValueSet.ofRanges(lessThan(BIGINT, 100L), greaterThan(BIGINT, 200L)), false)));\n\n Document query = MongoSession.buil...
{ "fields": [ { "declarator": "log = Logger.get(MongoSession.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(MongoSession.class);", "type": "Logger", "var_name": "log" }, { "declarator": "SYSTEM_TABLES = Arra...
{ "body": "@VisibleForTesting\n static Document buildQuery(TupleDomain<ColumnHandle> tupleDomain)\n {\n Document query = new Document();\n if (tupleDomain.getDomains().isPresent()) {\n for (Map.Entry<ColumnHandle, Domain> entry : tupleDomain.getDomains().get().entrySet()) {\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_311
{ "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 testColumnStats()\n {\n Stream.of(\"tiny\", \"sf1\").forEach(schema -> {\n double scaleFactor = TpchMetadata.schemaNameToScaleFactor(schema);\n\n //id column\n testColumnStats(schema, NATION, NATION_KEY, columnStatistics(25, 0, 24));\n\n ...
{ "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_741
{ "fields": [ { "declarator": "TWO = new BigInteger(\"2\")", "modifier": "private static final", "original_string": "private static final BigInteger TWO = new BigInteger(\"2\");", "type": "BigInteger", "var_name": "TWO" }, { "declarator": "TYPE = createDecimalType(38, 0...
{ "body": "@Test\n public void testCombineOverflow()\n {\n addToState(state, TWO.pow(125));\n addToState(state, TWO.pow(126));\n\n LongDecimalWithOverflowState otherState = new LongDecimalWithOverflowStateFactory().createSingleState();\n\n addToState(otherState, TWO.pow(125));\n ...
{ "fields": [ { "declarator": "DECIMAL_SUM_AGGREGATION = new DecimalSumAggregation()", "modifier": "public static final", "original_string": "public static final DecimalSumAggregation DECIMAL_SUM_AGGREGATION = new DecimalSumAggregation();", "type": "DecimalSumAggregation", "var_name"...
{ "body": "public static void combine(LongDecimalWithOverflowState state, LongDecimalWithOverflowState otherState)\n {\n state.setOverflow(state.getOverflow() + otherState.getOverflow());\n\n if (state.getLongDecimal() == null) {\n state.setLongDecimal(otherState.getLongDecimal());\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_184
{ "fields": [ { "declarator": "TEST_COLUMN_HANDLE = createBaseColumn(\n \"test\",\n 0,\n HiveType.HIVE_STRING,\n VARCHAR,\n HiveColumnHandle.ColumnType.PARTITION_KEY,\n Optional.empty())", "modifier": "private static final", "orig...
{ "body": "@Test\n public void testCreatePredicateWithNaN()\n {\n HiveColumnHandle columnHandle = DOUBLE_COLUMN_HANDLE;\n ImmutableList.Builder<HivePartition> partitions = ImmutableList.builder();\n\n partitions.add(new HivePartition(\n new SchemaTableName(\"test\", \"test\")...
{ "fields": [ { "declarator": "PRESTO_VERSION_NAME = \"presto_version\"", "modifier": "public static final", "original_string": "public static final String PRESTO_VERSION_NAME = \"presto_version\";", "type": "String", "var_name": "PRESTO_VERSION_NAME" }, { "declarator":...
{ "body": "@VisibleForTesting\n static TupleDomain<ColumnHandle> createPredicate(List<ColumnHandle> partitionColumns, List<HivePartition> partitions)\n {\n if (partitions.isEmpty()) {\n return TupleDomain.none();\n }\n\n return withColumnDomains(\n partitionColumns...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_887
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestUrlFunctions.java", "identifier": "TestUrlFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testUrlDecode()\n {\n String[][] inputOutputPairs = {\n {\"http%3A%2F%2Ftest\", \"http://test\"},\n {\"http%3A%2F%2Ftest%3Fa%3Db%26c%3Dd\", \"http://test?a=b&c=d\"},\n {\"http%3A%2F%2F%E3%83%86%E3%82%B9%E3%83%88\", \"http://\\u30...
{ "fields": [ { "declarator": "QUERY_SPLITTER = Splitter.on('&')", "modifier": "private static final", "original_string": "private static final Splitter QUERY_SPLITTER = Splitter.on('&');", "type": "Splitter", "var_name": "QUERY_SPLITTER" }, { "declarator": "ARG_SPLITTE...
{ "body": "@Description(\"Unescape a URL-encoded string\")\n @ScalarFunction\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice urlDecode(@SqlType(\"varchar(x)\") Slice value)\n {\n return decodeUrl(value.toStringUtf8());\n }", "class_method_signature": "UrlFunctio...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1271
{ "fields": [], "file": "presto-accumulo/src/test/java/io/prestosql/plugin/accumulo/model/TestRow.java", "identifier": "TestRow", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = \"type is null\")\n public void testRowTypeIsNull()\n {\n Row r1 = new Row();\n r1.addField(VARCHAR, null);\n }", "class_method_signature": "TestRow.testRowTypeIsNull()", "constructor": false...
{ "fields": [ { "declarator": "fields = new ArrayList<>()", "modifier": "private final", "original_string": "private final List<Field> fields = new ArrayList<>();", "type": "List<Field>", "var_name": "fields" } ], "file": "presto-accumulo/src/main/java/io/prestosql/plugin/acc...
{ "body": "public Row addField(Field field)\n {\n requireNonNull(field, \"field is null\");\n fields.add(field);\n return this;\n }", "class_method_signature": "Row.addField(Field field)", "constructor": false, "full_signature": "public Row addField(Field field)", "identifier": "add...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_868
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSplitPart()\n {\n assertFunction(\"SPLIT_PART('abc-@-def-@-ghi', '-@-', 1)\", createVarcharType(15), \"abc\");\n assertFunction(\"SPLIT_PART('abc-@-def-@-ghi', '-@-', 2)\", createVarcharType(15), \"def\");\n assertFunction(\"SPLIT_PART('abc-@-def-@-ghi', '...
{ "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": "@SqlNullable\n @Description(\"Splits a string by a delimiter and returns the specified field (counting from one)\")\n @ScalarFunction\n @LiteralParameters({\"x\", \"y\"})\n @SqlType(\"varchar(x)\")\n public static Slice splitPart(@SqlType(\"varchar(x)\") Slice string, @SqlType(\"varchar(y)\"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_491
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestDomain.java", "identifier": "TestDomain", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOverlaps()\n {\n assertTrue(Domain.all(BIGINT).overlaps(Domain.all(BIGINT)));\n assertFalse(Domain.all(BIGINT).overlaps(Domain.none(BIGINT)));\n assertTrue(Domain.all(BIGINT).overlaps(Domain.notNull(BIGINT)));\n assertTrue(Domain.all(BIGINT).overlap...
{ "fields": [ { "declarator": "DEFAULT_COMPACTION_THRESHOLD = 32", "modifier": "public static final", "original_string": "public static final int DEFAULT_COMPACTION_THRESHOLD = 32;", "type": "int", "var_name": "DEFAULT_COMPACTION_THRESHOLD" }, { "declarator": "values", ...
{ "body": "public boolean overlaps(Domain other)\n {\n checkCompatibility(other);\n if (this.isNullAllowed() && other.isNullAllowed()) {\n return true;\n }\n return values.overlaps(other.getValues());\n }", "class_method_signature": "Domain.overlaps(Domain other)", "co...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1158
{ "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 testImmediateMemoryRevoking()\n throws Exception\n {\n // Given\n SqlTask sqlTask = newSqlTask();\n OperatorContext operatorContext = createContexts(sqlTask);\n\n allOperatorContexts = ImmutableSet.of(operatorContext);\n List<SqlTask> ...
{ "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": "@VisibleForTesting\n void registerPoolListeners()\n {\n memoryPools.forEach(memoryPool -> memoryPool.addListener(memoryPoolListener));\n }", "class_method_signature": "MemoryRevokingScheduler.registerPoolListeners()", "constructor": false, "full_signature": "@VisibleForTesting void re...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_612
{ "fields": [], "file": "presto-teradata-functions/src/test/java/io/prestosql/teradata/functions/dateformat/TestDateFormatParser.java", "identifier": "TestDateFormatParser", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testCreateDateTimeFormatter()\n {\n DateTimeFormatter formatter = DateFormatParser.createDateTimeFormatter(\"yyyy/mm/dd\");\n assertEquals(formatter.parseDateTime(\"1988/04/08\"), new DateTime(1988, 4, 8, 0, 0));\n }", "class_method_signature": "TestDateFormatPa...
{ "fields": [], "file": "presto-teradata-functions/src/main/java/io/prestosql/teradata/functions/dateformat/DateFormatParser.java", "identifier": "DateFormatParser", "interfaces": "", "methods": [ { "class_method_signature": "DateFormatParser.DateFormatParser()", "constructor": true, "fu...
{ "body": "public static DateTimeFormatter createDateTimeFormatter(String format)\n {\n DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();\n for (Token token : tokenize(format)) {\n switch (token.getType()) {\n case DateFormat.TEXT:\n build...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_242
{ "fields": [ { "declarator": "AVAILABLE_WORKERS = ImmutableList.of(\"node1\", \"node2\", \"node3\", \"node4\", \"node5\")", "modifier": "private static final", "original_string": "private static final List<String> AVAILABLE_WORKERS = ImmutableList.of(\"node1\", \"node2\", \"node3\", \"node4\", ...
{ "body": "@Test\n public void testMultipleDistributionUnbalancedWithDiskSpace()\n {\n long distributionA = createDistribution(\"distA\", 4);\n createBucketedTable(\"testA\", distributionA, DataSize.valueOf(\"4B\"));\n createAssignments(distributionA, AVAILABLE_WORKERS, 1, 1, 1, 1, 0);\n\n ...
{ "fields": [ { "declarator": "log = Logger.get(BucketBalancer.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(BucketBalancer.class);", "type": "Logger", "var_name": "log" }, { "declarator": "nodeSupplier", ...
{ "body": "@VisibleForTesting\n ClusterState fetchClusterState()\n {\n Set<String> activeNodes = nodeSupplier.getWorkerNodes().stream()\n .map(Node::getNodeIdentifier)\n .collect(toSet());\n\n Map<String, Long> assignedNodeSize = new HashMap<>(activeNodes.stream().col...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_757
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/project/TestInputPageProjection.java", "identifier": "TestInputPageProjection", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLazyInputPage()\n {\n InputPageProjection projection = new InputPageProjection(0, BIGINT);\n Block block = createLongSequenceBlock(0, 100);\n Block result = projection.project(SESSION, new DriverYieldSignal(), new Page(block), SelectedPositions.positionsRa...
{ "fields": [ { "declarator": "type", "modifier": "private final", "original_string": "private final Type type;", "type": "Type", "var_name": "type" }, { "declarator": "inputChannels", "modifier": "private final", "original_string": "private final InputChann...
{ "body": "@Override\n public Work<Block> project(ConnectorSession session, DriverYieldSignal yieldSignal, Page page, SelectedPositions selectedPositions)\n {\n Block block = requireNonNull(page, \"page is null\").getBlock(0);\n requireNonNull(selectedPositions, \"selectedPositions is null\");\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_307
{ "fields": [], "file": "presto-kafka/src/test/java/io/prestosql/plugin/kafka/TestKafkaFilterManager.java", "identifier": "TestKafkaFilterManager", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFilterRangeByDomain()\n {\n Domain testDomain = Domain.singleValue(BIGINT, 1L);\n assertTrue(KafkaFilterManager.filterRangeByDomain(testDomain).isPresent());\n assertEquals(KafkaFilterManager.filterRangeByDomain(testDomain).get().getBegin(), 1L);\n ...
{ "fields": [ { "declarator": "INVALID_KAFKA_RANGE_INDEX = -1", "modifier": "private static final", "original_string": "private static final long INVALID_KAFKA_RANGE_INDEX = -1;", "type": "long", "var_name": "INVALID_KAFKA_RANGE_INDEX" }, { "declarator": "TOPIC_CONFIG_T...
{ "body": "@VisibleForTesting\n public static Optional<Range> filterRangeByDomain(Domain domain)\n {\n Long low = INVALID_KAFKA_RANGE_INDEX;\n Long high = INVALID_KAFKA_RANGE_INDEX;\n if (domain.isSingleValue()) {\n // still return range for single value case like (_partition_off...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_429
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/TestPage.java", "identifier": "TestPage", "interfaces": "", "superclass": "" }
{ "body": "@Test(expectedExceptions = IndexOutOfBoundsException.class, expectedExceptionsMessageRegExp = \"Invalid position 1 and length 1 in page with 0 positions\")\n public void testGetRegionExceptions()\n {\n new Page(0).getRegion(1, 1);\n }", "class_method_signature": "TestPage.testGetRegionExc...
{ "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 getRegion(int positionOffset, int length)\n {\n if (positionOffset < 0 || length < 0 || positionOffset + length > positionCount) {\n throw new IndexOutOfBoundsException(format(\"Invalid position %s and length %s in page with %s positions\", positionOffset, length, positionC...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_583
{ "fields": [], "file": "presto-base-jdbc/src/test/java/io/prestosql/plugin/jdbc/TestJdbcConnectorFactory.java", "identifier": "TestJdbcConnectorFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void test()\n {\n ConnectorFactory connectorFactory = new JdbcConnectorFactory(\"test\", new TestingH2JdbcModule());\n\n connectorFactory.create(\"test\", TestingH2JdbcModule.createProperties(), new TestingConnectorContext());\n }", "class_method_signature": "TestJdb...
{ "fields": [ { "declarator": "name", "modifier": "private final", "original_string": "private final String name;", "type": "String", "var_name": "name" }, { "declarator": "moduleProvider", "modifier": "private final", "original_string": "private final JdbcM...
{ "body": "@Override\n public Connector create(String catalogName, Map<String, String> requiredConfig, ConnectorContext context)\n {\n requireNonNull(requiredConfig, \"requiredConfig is null\");\n\n Bootstrap app = new Bootstrap(\n binder -> binder.bind(TypeManager.class).toInstance...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_995
{ "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 testLeftJoin()\n {\n ImmutableList.Builder<JoinNode.EquiJoinClause> criteriaBuilder = ImmutableList.builder();\n criteriaBuilder.add(new JoinNode.EquiJoinClause(A, D));\n criteriaBuilder.add(new JoinNode.EquiJoinClause(B, E));\n List<JoinNode.EquiJoinCl...
{ "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_1226
{ "fields": [ { "declarator": "topologyFile", "modifier": "private", "original_string": "private File topologyFile;", "type": "File", "var_name": "topologyFile" }, { "declarator": "topologyNewFile", "modifier": "private", "original_string": "private File top...
{ "body": "@Test\n public void testRefresh()\n throws Exception\n {\n try (TempFile tempFile = new TempFile()) {\n Files.copy(topologyFile, tempFile.file());\n\n TestingTicker ticker = new TestingTicker();\n FileBasedNetworkTopology topology = new FileBasedNetw...
{ "fields": [ { "declarator": "log = Logger.get(FileBasedNetworkTopology.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(FileBasedNetworkTopology.class);", "type": "Logger", "var_name": "log" }, { "declarator...
{ "body": "@Override\n public NetworkLocation locate(HostAddress address)\n {\n return getTopology().getOrDefault(address.getHostText(), ROOT_LOCATION);\n }", "class_method_signature": "FileBasedNetworkTopology.locate(HostAddress address)", "constructor": false, "full_signature": "@Override publ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_215
{ "fields": [], "file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/backup/TestFileBackupConfig.java", "identifier": "TestFileBackupConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(FileBackupConfig.class)\n .setBackupDirectory(null));\n }", "class_method_signature": "TestFileBackupConfig.testDefaults()", "constructor": false, "full_signature": "@Test public void testDef...
{ "fields": [ { "declarator": "backupDirectory", "modifier": "private", "original_string": "private File backupDirectory;", "type": "File", "var_name": "backupDirectory" } ], "file": "presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/backup/FileBackupConfig...
{ "body": "@Config(\"backup.directory\")\n @ConfigDescription(\"Base directory to use for the backup copy of shard data\")\n public FileBackupConfig setBackupDirectory(File backupDirectory)\n {\n this.backupDirectory = backupDirectory;\n return this;\n }", "class_method_signature": "FileBa...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_645
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestBigintOperators.java", "identifier": "TestBigintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testMultiply()\n {\n assertFunction(\"100000000037 * 37\", BIGINT, 100000000037L * 37L);\n assertFunction(\"37 * 100000000017\", BIGINT, 37 * 100000000017L);\n assertFunction(\"100000000017 * 37\", BIGINT, 100000000017L * 37L);\n assertFunction(\"100000...
{ "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(MULTIPLY)\n @SqlType(StandardTypes.BIGINT)\n public static long multiply(@SqlType(StandardTypes.BIGINT) long left, @SqlType(StandardTypes.BIGINT) long right)\n {\n try {\n return Math.multiplyExact(left, right);\n }\n catch (ArithmeticException e) {\...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_350
{ "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 testGetAttributes()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getAttributes(null, null, null, null)) {\n assertFalse(rs.next());\n }\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 getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern)\n throws SQLException\n {\n return selectEmpty(\"\" +\n \"SELECT TYPE_CAT, TYPE_SCHEM, TYPE_NAME, ATTR_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_700
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestRealOperators.java", "identifier": "TestRealOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToInteger()\n {\n assertFunction(\"CAST(REAL'754.2008' AS INTEGER)\", INTEGER, 754);\n assertFunction(\"CAST(REAL'-754.1985' AS INTEGER)\", INTEGER, -754);\n assertFunction(\"CAST(REAL'9.99' AS INTEGER)\", INTEGER, 10);\n assertFunction(\"CAST(R...
{ "fields": [ { "declarator": "MIN_LONG_AS_FLOAT = -0x1p63f", "modifier": "private static final", "original_string": "private static final float MIN_LONG_AS_FLOAT = -0x1p63f;", "type": "float", "var_name": "MIN_LONG_AS_FLOAT" }, { "declarator": "MAX_LONG_PLUS_ONE_AS_FLO...
{ "body": "@ScalarOperator(CAST)\n @SqlType(StandardTypes.INTEGER)\n public static long castToInteger(@SqlType(StandardTypes.REAL) long value)\n {\n float floatValue = intBitsToFloat((int) value);\n if (Float.isNaN(floatValue)) {\n throw new PrestoException(INVALID_CAST_ARGUMENT, \"C...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_517
{ "fields": [], "file": "presto-cli/src/test/java/io/prestosql/cli/TestClientOptions.java", "identifier": "TestClientOptions", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTimeZone()\n {\n Console console = createConsole(\"--timezone=Europe/Vilnius\");\n\n ClientOptions options = console.clientOptions;\n assertEquals(options.timeZone, ZoneId.of(\"Europe/Vilnius\"));\n\n ClientSession session = options.toClientSession(...
{ "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_147
{ "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 testGetTableStatisticsSampling()\n {\n MetastoreHiveStatisticsProvider statisticsProvider = new MetastoreHiveStatisticsProvider((session, table, hivePartitions) -> {\n assertEquals(table, TABLE);\n assertEquals(hivePartitions.size(), 1);\n r...
{ "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_844
{ "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 testInverseNormalCdf()\n {\n assertFunction(\"inverse_normal_cdf(0, 1, 0.3)\", DOUBLE, -0.52440051270804089);\n assertFunction(\"inverse_normal_cdf(10, 9, 0.9)\", DOUBLE, 21.533964089901406);\n assertFunction(\"inverse_normal_cdf(0.5, 0.25, 0.65)\", DOUBLE, 0....
{ "fields": [ { "declarator": "DECIMAL_MOD_FUNCTION = decimalModFunction()", "modifier": "public static final", "original_string": "public static final SqlScalarFunction DECIMAL_MOD_FUNCTION = decimalModFunction();", "type": "SqlScalarFunction", "var_name": "DECIMAL_MOD_FUNCTION" ...
{ "body": "@Description(\"Inverse of normal cdf given a mean, std, and probability\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double inverseNormalCdf(@SqlType(StandardTypes.DOUBLE) double mean, @SqlType(StandardTypes.DOUBLE) double sd, @SqlType(StandardTypes.DOUBLE) double p)\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_31
{ "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 testTableRulesForCheckCanDeleteFromTable()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-table.json\");\n\n accessControl.checkCanDeleteFromTable(ADMIN, new CatalogSchemaTableName(\"some-catalog\", \"bobschema\",...
{ "fields": [ { "declarator": "log = Logger.get(FileBasedSystemAccessControl.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(FileBasedSystemAccessControl.class);", "type": "Logger", "var_name": "log" }, { "de...
{ "body": "@Override\n public void checkCanDeleteFromTable(SystemSecurityContext context, CatalogSchemaTableName table)\n {\n if (!checkTablePermission(context, table, DELETE)) {\n denyDeleteTable(table.toString());\n }\n }", "class_method_signature": "FileBasedSystemAccessControl....
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_901
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/optimizations/TestLocalProperties.java", "identifier": "TestLocalProperties", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testNormalizeComplexWithLeadingConstant()\n {\n List<LocalProperty<String>> localProperties = builder()\n .constant(\"a\")\n .grouped(\"a\", \"b\")\n .grouped(\"b\", \"c\")\n .sorted(\"c\", SortOrder.ASC_NULLS_FIRS...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/sql/planner/optimizations/LocalProperties.java", "identifier": "LocalProperties", "interfaces": "", "methods": [ { "class_method_signature": "LocalProperties.LocalProperties()", "constructor": true, "full_signature": "privat...
{ "body": "public static <T> List<LocalProperty<T>> grouped(Collection<T> columns)\n {\n return ImmutableList.of(new GroupingProperty<>(columns));\n }", "class_method_signature": "LocalProperties.grouped(Collection<T> columns)", "constructor": false, "full_signature": "public static List<LocalPrope...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_452
{ "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 testShiftRightArray8()\n {\n assertShiftRightArray8(TWO.pow(1), 0);\n assertShiftRightArray8(TWO.pow(1), 1);\n assertShiftRightArray8(TWO.pow(1), 10);\n\n assertShiftRightArray8(TWO.pow(15).add(TWO.pow(3)), 2);\n assertShiftRightArray8(TWO.pow(15...
{ "fields": [ { "declarator": "NUMBER_OF_LONGS = 2", "modifier": "private static final", "original_string": "private static final int NUMBER_OF_LONGS = 2;", "type": "int", "var_name": "NUMBER_OF_LONGS" }, { "declarator": "NUMBER_OF_INTS = 2 * NUMBER_OF_LONGS", "mo...
{ "body": "public static void shiftRightArray8(int[] values, int rightShifts, Slice result)\n {\n if (values.length != NUMBER_OF_INTS * 2) {\n throw new IllegalArgumentException(\"Incorrect values length\");\n }\n if (rightShifts == 0) {\n for (int i = NUMBER_OF_INTS; 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_1031
{ "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 testGroupByWithQualifiedName2()\n {\n // TODO: verify output\n analyze(\"SELECT t1.a FROM t1 GROUP BY a\");\n }", "class_method_signature": "TestAnalyzer.testGroupByWithQualifiedName2()", "constructor": false, "full_signature": "@Test public void testGroupBy...
{ "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_281
{ "fields": [ { "declarator": "TYPE_MANAGER = new InternalTypeManager(createTestMetadataManager(), new TypeOperators())", "modifier": "private static final", "original_string": "private static final TypeManager TYPE_MANAGER = new InternalTypeManager(createTestMetadataManager(), new TypeOperators...
{ "body": "@Test\n public void testGetRecordSet()\n {\n ConnectorTableHandle tableHandle = new PrometheusTableHandle(\"schema\", \"table\");\n PrometheusRecordSetProvider recordSetProvider = new PrometheusRecordSetProvider(client);\n RecordSet recordSet = recordSetProvider.getRecordSet(Prom...
{ "fields": [ { "declarator": "prometheusClient", "modifier": "private final", "original_string": "private final PrometheusClient prometheusClient;", "type": "PrometheusClient", "var_name": "prometheusClient" } ], "file": "presto-prometheus/src/main/java/io/prestosql/plugin/p...
{ "body": "@Override\n public RecordSet getRecordSet(ConnectorTransactionHandle transaction, ConnectorSession session, ConnectorSplit split, ConnectorTableHandle table, List<? extends ColumnHandle> columns)\n {\n PrometheusSplit prometheusSplit = (PrometheusSplit) split;\n\n ImmutableList.Builder<...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...