id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
166515022_381
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTBuffer()\n {\n assertFunction(\"ST_AsText(ST_Buffer(ST_Point(0, 0), 0.5))\", VARCHAR, \"POLYGON ((0.5 0, 0.4989294616193014 0.03270156461507146, 0.49572243068690486 0.0652630961100257, 0.4903926402016149 0.09754516100806403, 0.4829629131445338 0.12940952255126026, 0.4...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@SqlNullable\n @Description(\"Returns the geometry that represents all points whose distance from the specified geometry is less than or equal to the specified distance\")\n @ScalarFunction(\"ST_Buffer\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice stBuffer(@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_1131
{ "fields": [ { "declarator": "embedVersion", "modifier": "private", "original_string": "private EmbedVersion embedVersion;", "type": "EmbedVersion", "var_name": "embedVersion" } ], "file": "presto-main/src/test/java/io/prestosql/version/TestEmbedVersion.java", "identifier"...
{ "body": "@Test\n public void testEmbedVersionInCallable()\n throws Exception\n {\n AtomicInteger counter = new AtomicInteger();\n String value = embedVersion.embedVersion(() -> {\n return \"abc\" + counter.incrementAndGet();\n }).call();\n assertEquals(value, ...
{ "fields": [ { "declarator": "runnableConstructor", "modifier": "private final", "original_string": "private final MethodHandle runnableConstructor;", "type": "MethodHandle", "var_name": "runnableConstructor" }, { "declarator": "callableConstructor", "modifier": ...
{ "body": "@Inject\n public EmbedVersion(NodeVersion version)\n {\n this(version.getVersion());\n }", "class_method_signature": "EmbedVersion.EmbedVersion(NodeVersion version)", "constructor": true, "full_signature": "@Inject public EmbedVersion(NodeVersion version)", "identifier": "EmbedVers...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1074
{ "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 testNullTreatment()\n {\n assertFails(\"SELECT count() RESPECT NULLS OVER ()\")\n .hasErrorCode(NULL_TREATMENT_NOT_ALLOWED);\n\n assertFails(\"SELECT count() IGNORE NULLS OVER ()\")\n .hasErrorCode(NULL_TREATMENT_NOT_ALLOWED);\n\n ...
{ "fields": [ { "declarator": "metadata", "modifier": "private final", "original_string": "private final Metadata metadata;", "type": "Metadata", "var_name": "metadata" }, { "declarator": "sqlParser", "modifier": "private final", "original_string": "private ...
{ "body": "public Analysis analyze(Statement statement)\n {\n return analyze(statement, false);\n }", "class_method_signature": "Analyzer.analyze(Statement statement)", "constructor": false, "full_signature": "public Analysis analyze(Statement statement)", "identifier": "analyze", "invocations"...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_694
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestRealOperators.java", "identifier": "TestRealOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testAdd()\n {\n assertFunction(\"REAL'12.34' + REAL'56.78'\", REAL, 12.34f + 56.78f);\n assertFunction(\"REAL'-17.34' + REAL'-22.891'\", REAL, -17.34f + -22.891f);\n assertFunction(\"REAL'-89.123' + REAL'754.0'\", REAL, -89.123f + 754.0f);\n assertFunct...
{ "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(ADD)\n @SqlType(StandardTypes.REAL)\n public static long add(@SqlType(StandardTypes.REAL) long left, @SqlType(StandardTypes.REAL) long right)\n {\n return floatToRawIntBits(intBitsToFloat((int) left) + intBitsToFloat((int) right));\n }", "class_method_signature": "RealO...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_944
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestTransformExistsApplyToCorrelatedJoin.java", "identifier": "TestTransformExistsApplyToCorrelatedJoin", "interfaces": "", "superclass": "extends BaseRuleTest" }
{ "body": "@Test\n public void testRewritesToLimit()\n {\n tester().assertThat(new TransformExistsApplyToCorrelatedJoin(tester().getMetadata()))\n .on(p ->\n p.apply(\n Assignments.of(p.symbol(\"b\", BOOLEAN), expression(\"EXISTS(SELECT...
{ "fields": [ { "declarator": "PATTERN = applyNode()", "modifier": "private static final", "original_string": "private static final Pattern<ApplyNode> PATTERN = applyNode();", "type": "Pattern<ApplyNode>", "var_name": "PATTERN" }, { "declarator": "COUNT = QualifiedName....
{ "body": "@Override\n public Result apply(ApplyNode parent, Captures captures, Context context)\n {\n if (parent.getSubqueryAssignments().size() != 1) {\n return Result.empty();\n }\n\n Expression expression = getOnlyElement(parent.getSubqueryAssignments().getExpressions());\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_417
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTUnion()\n {\n List<String> emptyWkts =\n ImmutableList.of(\n \"POINT EMPTY\",\n \"MULTIPOINT EMPTY\",\n \"LINESTRING EMPTY\",\n \"MULTILINESTRING EMPTY\",\n ...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns a geometry that represents the point set union of the input geometries.\")\n @ScalarFunction(\"ST_Union\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice stUnion(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMETRY_TYPE_NAME) Slice right)\n {\n return 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_552
{ "fields": [ { "declarator": "POSITIONS_PER_PAGE = 0", "modifier": "private static final", "original_string": "private static final int POSITIONS_PER_PAGE = 0;", "type": "int", "var_name": "POSITIONS_PER_PAGE" }, { "declarator": "pagesStore", "modifier": "private...
{ "body": "@Test\n public void testCleanUp()\n {\n createTable(0L, 0L);\n createTable(1L, 0L, 1L);\n createTable(2L, 0L, 1L, 2L);\n\n assertTrue(pagesStore.contains(0L));\n assertTrue(pagesStore.contains(1L));\n assertTrue(pagesStore.contains(2L));\n\n insertToTa...
{ "fields": [ { "declarator": "maxBytes", "modifier": "private final", "original_string": "private final long maxBytes;", "type": "long", "var_name": "maxBytes" }, { "declarator": "currentBytes", "modifier": "@GuardedBy(\"this\")\n private", "original_str...
{ "body": "public synchronized void cleanUp(Set<Long> activeTableIds)\n {\n // We have to remember that there might be some race conditions when there are two tables created at once.\n // That can lead to a situation when MemoryPagesStore already knows about a newer second table on some worker\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_102
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/thrift/TestThriftMetastoreUtil.java", "identifier": "TestThriftMetastoreUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testListApplicableRoles()\n {\n PrestoPrincipal admin = new PrestoPrincipal(USER, \"admin\");\n\n Multimap<String, String> inheritance = ImmutableMultimap.<String, String>builder()\n .put(\"a\", \"b1\")\n .put(\"a\", \"b2\")\n ...
{ "fields": [ { "declarator": "PUBLIC_ROLE_NAME = \"public\"", "modifier": "private static final", "original_string": "private static final String PUBLIC_ROLE_NAME = \"public\";", "type": "String", "var_name": "PUBLIC_ROLE_NAME" }, { "declarator": "ADMIN_ROLE_NAME = \"a...
{ "body": "public static Stream<RoleGrant> listApplicableRoles(HivePrincipal principal, Function<HivePrincipal, Set<RoleGrant>> listRoleGrants)\n {\n return Streams.stream(new AbstractIterator<>()\n {\n private final Queue<RoleGrant> output = new ArrayDeque<>();\n private final ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1218
{ "fields": [ { "declarator": "OUT = new OutputBufferId(0)", "modifier": "public static final", "original_string": "public static final OutputBufferId OUT = new OutputBufferId(0);", "type": "OutputBufferId", "var_name": "OUT" }, { "declarator": "CONNECTOR_ID = TEST_TABL...
{ "body": "@Test\n public void testScheduleNoSplits()\n {\n StageExecutionPlan plan = createPlan(createFixedSplitSource(0, TestingSplit::createRemoteSplit));\n NodeTaskMap nodeTaskMap = new NodeTaskMap(finalizerService);\n SqlStageExecution stage = createSqlStageExecution(plan, nodeTaskMap)...
{ "fields": [ { "declarator": "stage", "modifier": "private final", "original_string": "private final SqlStageExecution stage;", "type": "SqlStageExecution", "var_name": "stage" }, { "declarator": "splitSource", "modifier": "private final", "original_string"...
{ "body": "@Override\n public synchronized ScheduleResult schedule()\n {\n dropListenersFromWhenFinishedOrNewLifespansAdded();\n\n int overallSplitAssignmentCount = 0;\n ImmutableSet.Builder<RemoteTask> overallNewTasks = ImmutableSet.builder();\n List<ListenableFuture<?>> overallBloc...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_801
{ "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 testSha256()\n {\n assertFunction(\"sha256(CAST('' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855\"));\n assertFunction(\"sha256(CAST('hashme' AS VARBINARY))\", VARBINARY, sqlVarbinaryFromHex(\"0220...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/operator/scalar/VarbinaryFunctions.java", "identifier": "VarbinaryFunctions", "interfaces": "", "methods": [ { "class_method_signature": "VarbinaryFunctions.VarbinaryFunctions()", "constructor": true, "full_signature": "priv...
{ "body": "@Description(\"Compute sha256 hash\")\n @ScalarFunction\n @SqlType(StandardTypes.VARBINARY)\n public static Slice sha256(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n return computeHash(Hashing.sha256(), slice);\n }", "class_method_signature": "VarbinaryFunctions.sha256(@SqlT...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_74
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueExpressionUtil.java", "identifier": "TestGlueExpressionUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBuildGlueExpressionMaxLengthOneColumn()\n {\n TupleDomain<String> filter = new PartitionFilterBuilder()\n .addStringValues(\"col1\", \"x\".repeat(5))\n .addStringValues(\"col2\", \"x\".repeat(25))\n .build();\n String ...
{ "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_1127
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/server/TestJmxNamingConfig.java", "identifier": "TestJmxNamingConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaults()\n {\n assertRecordedDefaults(recordDefaults(JmxNamingConfig.class)\n .setDomainBase(\"presto\"));\n }", "class_method_signature": "TestJmxNamingConfig.testDefaults()", "constructor": false, "full_signature": "@Test public void testDefa...
{ "fields": [ { "declarator": "domainBase = \"presto\"", "modifier": "private", "original_string": "private String domainBase = \"presto\";", "type": "String", "var_name": "domainBase" } ], "file": "presto-main/src/main/java/io/prestosql/server/JmxNamingConfig.java", "ident...
{ "body": "@Config(\"jmx.base-name\")\n public JmxNamingConfig setDomainBase(String domainBase)\n {\n this.domainBase = domainBase;\n return this;\n }", "class_method_signature": "JmxNamingConfig.setDomainBase(String domainBase)", "constructor": false, "full_signature": "@Config(\"jmx.bas...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_397
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTBoundary()\n {\n assertFunction(\"ST_AsText(ST_Boundary(ST_GeometryFromText('POINT (1 2)')))\", VARCHAR, \"MULTIPOINT EMPTY\");\n assertFunction(\"ST_AsText(ST_Boundary(ST_GeometryFromText('MULTIPOINT (1 2, 2 4, 3 6, 4 8)')))\", VARCHAR, \"MULTIPOINT EMPTY\");\...
{ "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 closure of the combinatorial boundary of this Geometry\")\n @ScalarFunction(\"ST_Boundary\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice stBoundary(@SqlType(GEOMETRY_TYPE_NAME) Slice input)\n {\n OGCGeometry geometry = deserialize(input);\n if (...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_728
{ "fields": [ { "declarator": "blockTypeOperators = new BlockTypeOperators(new TypeOperators())", "modifier": "private", "original_string": "private BlockTypeOperators blockTypeOperators = new BlockTypeOperators(new TypeOperators());", "type": "BlockTypeOperators", "var_name": "block...
{ "body": "@Test\n public void testBinaryMergeIteratorOverPageWithDifferentHashes()\n {\n Page page = rowPagesBuilder(BIGINT)\n .row(42)\n .row(42)\n .row(52)\n .row(60)\n .build().get(0);\n\n WorkProcessor<Page> mergedPage...
{ "fields": [ { "declarator": "memoryContext", "modifier": "private final", "original_string": "private final AggregatedMemoryContext memoryContext;", "type": "AggregatedMemoryContext", "var_name": "memoryContext" }, { "declarator": "blockTypeOperators", "modifier...
{ "body": "public WorkProcessor<Page> merge(List<Type> keyTypes, List<Type> allTypes, List<WorkProcessor<Page>> channels, DriverYieldSignal driverYieldSignal)\n {\n InterpretedHashGenerator hashGenerator = createHashGenerator(keyTypes);\n return mergeSortedPages(\n channels,\n ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_682
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestIntegerOperators.java", "identifier": "TestIntegerOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSubtract()\n {\n assertFunction(\"INTEGER'37' - INTEGER'37'\", INTEGER, 0);\n assertFunction(\"INTEGER'37' - INTEGER'17'\", INTEGER, 37 - 17);\n assertFunction(\"INTEGER'17' - INTEGER'37'\", INTEGER, 17 - 37);\n assertFunction(\"INTEGER'17' - INTEGE...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/type/IntegerOperators.java", "identifier": "IntegerOperators", "interfaces": "", "methods": [ { "class_method_signature": "IntegerOperators.IntegerOperators()", "constructor": true, "full_signature": "private IntegerOperato...
{ "body": "@ScalarOperator(SUBTRACT)\n @SqlType(StandardTypes.INTEGER)\n public static long subtract(@SqlType(StandardTypes.INTEGER) long left, @SqlType(StandardTypes.INTEGER) long right)\n {\n try {\n return Math.subtractExact((int) left, (int) right);\n }\n catch (Arithmetic...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_378
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTPoint()\n {\n assertFunction(\"ST_AsText(ST_Point(1, 4))\", VARCHAR, \"POINT (1 4)\");\n assertFunction(\"ST_AsText(ST_Point(122.3, 10.55))\", VARCHAR, \"POINT (122.3 10.55)\");\n }", "class_method_signature": "TestGeoFunctions.testSTPoint()", "construct...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@Description(\"Returns a Geometry type Point object with the given coordinate values\")\n @ScalarFunction(\"ST_Point\")\n @SqlType(GEOMETRY_TYPE_NAME)\n public static Slice stPoint(@SqlType(DOUBLE) double x, @SqlType(DOUBLE) double y)\n {\n OGCGeometry geometry = createFromEsriGeometry(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_1062
{ "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 testIfInJoinClause()\n {\n analyze(\"SELECT * FROM (VALUES (1)) a (x) JOIN (VALUES (2)) b ON IF(a.x = 1, true, false)\");\n }", "class_method_signature": "TestAnalyzer.testIfInJoinClause()", "constructor": false, "full_signature": "@Test public void testIfInJoinCla...
{ "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_401
{ "fields": [], "file": "presto-geospatial/src/test/java/io/prestosql/plugin/geospatial/TestGeoFunctions.java", "identifier": "TestGeoFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testSTDistance()\n {\n assertFunction(\"ST_Distance(ST_Point(50, 100), ST_Point(150, 150))\", DOUBLE, 111.80339887498948);\n assertFunction(\"ST_Distance(ST_Point(50, 100), ST_GeometryFromText('POINT (150 150)'))\", DOUBLE, 111.80339887498948);\n assertFunctio...
{ "fields": [ { "declarator": "OR_JOINER = Joiner.on(\" or \")", "modifier": "private static final", "original_string": "private static final Joiner OR_JOINER = Joiner.on(\" or \");", "type": "Joiner", "var_name": "OR_JOINER" }, { "declarator": "EMPTY_POLYGON = serializ...
{ "body": "@SqlNullable\n @Description(\"Returns the 2-dimensional cartesian minimum distance (based on spatial ref) between two geometries in projected units\")\n @ScalarFunction(\"ST_Distance\")\n @SqlType(DOUBLE)\n public static Double stDistance(@SqlType(GEOMETRY_TYPE_NAME) Slice left, @SqlType(GEOMET...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_952
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/iterative/rule/TestRemoveUnreferencedScalarApplyNodes.java", "identifier": "TestRemoveUnreferencedScalarApplyNodes", "interfaces": "", "superclass": "extends BaseRuleTest" }
{ "body": "@Test\n public void testDoesNotFire()\n {\n tester().assertThat(new RemoveUnreferencedScalarApplyNodes())\n .on(p -> p.apply(\n Assignments.of(p.symbol(\"z\"), p.expression(\"x IN (y)\")),\n ImmutableList.of(),\n ...
{ "fields": [ { "declarator": "PATTERN = applyNode()\n .matching(applyNode -> applyNode.getSubqueryAssignments().isEmpty())", "modifier": "private static final", "original_string": "private static final Pattern<ApplyNode> PATTERN = applyNode()\n .matching(applyNode -> apply...
{ "body": "@Override\n public Result apply(ApplyNode applyNode, Captures captures, Context context)\n {\n return Result.ofPlanNode(applyNode.getInput());\n }", "class_method_signature": "RemoveUnreferencedScalarApplyNodes.apply(ApplyNode applyNode, Captures captures, Context context)", "constructo...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_62
{ "fields": [ { "declarator": "DATABASE = new Database(\n \"database\",\n Optional.of(\"location\"),\n \"owner\",\n USER,\n Optional.of(\"comment\"),\n ImmutableMap.of(\"param\", \"value\"))", "modifier": "private static final", "...
{ "body": "@Test\n public void testRecordingHiveMetastore()\n throws IOException\n {\n HiveConfig recordingHiveConfig = new HiveConfig()\n .setRecordingPath(File.createTempFile(\"recording_test\", \"json\").getAbsolutePath())\n .setRecordingDuration(new Duration(1...
{ "fields": [ { "declarator": "delegate", "modifier": "private final", "original_string": "private final HiveMetastore delegate;", "type": "HiveMetastore", "var_name": "delegate" }, { "declarator": "recordingCodec", "modifier": "private final", "original_str...
{ "body": "@Inject\n public RecordingHiveMetastore(@ForRecordingHiveMetastore HiveMetastore delegate, HiveConfig hiveConfig, JsonCodec<RecordingHiveMetastore.Recording> recordingCodec)\n throws IOException\n {\n this.delegate = requireNonNull(delegate, \"delegate is null\");\n this.reco...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_817
{ "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 testE()\n {\n assertFunction(\"e()\", DOUBLE, Math.E);\n }", "class_method_signature": "TestMathFunctions.testE()", "constructor": false, "full_signature": "@Test public void testE()", "identifier": "testE", "invocations": [ "assertFunction" ], "modifie...
{ "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(\"Euler's number\")\n @ScalarFunction\n @SqlType(StandardTypes.DOUBLE)\n public static double e()\n {\n return Math.E;\n }", "class_method_signature": "MathFunctions.e()", "constructor": false, "full_signature": "@Description(\"Euler's number\") @ScalarFunction @Sql...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_114
{ "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 testGetPartitionsByNames()\n {\n assertEquals(mockClient.getAccessCount(), 0);\n Table table = metastore.getTable(IDENTITY, TEST_DATABASE, TEST_TABLE).get();\n assertEquals(mockClient.getAccessCount(), 1);\n\n // Select half of the available partitions ...
{ "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 Map<String, Optional<Partition>> getPartitionsByNames(HiveIdentity identity, Table table, List<String> partitionNames)\n {\n List<WithIdentity<HivePartitionName>> names = partitionNames.stream()\n .map(name -> new WithIdentity<>(updateIdentity(identity), hiveP...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_544
{ "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 testConfiguration()\n {\n FileResourceGroupConfigurationManager manager = parse(\"resource_groups_config.json\");\n ResourceGroupId globalId = new ResourceGroupId(\"global\");\n ResourceGroup global = new TestingResourceGroup(globalId);\n manager.config...
{ "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 void configure(ResourceGroup group, SelectionContext<ResourceGroupIdTemplate> context)\n {\n configureGroup(group, getMatchingSpec(group, context));\n }", "class_method_signature": "FileResourceGroupConfigurationManager.configure(ResourceGroup group, SelectionContext<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_790
{ "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 testToHex()\n {\n assertFunction(\"to_hex(CAST('' AS VARBINARY))\", VARCHAR, encodeHex(\"\"));\n assertFunction(\"to_hex(CAST('a' AS VARBINARY))\", VARCHAR, encodeHex(\"a\"));\n assertFunction(\"to_hex(CAST('abc' AS VARBINARY))\", VARCHAR, encodeHex(\"abc\"));...
{ "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 binary data as hex\")\n @ScalarFunction\n @SqlType(StandardTypes.VARCHAR)\n public static Slice toHex(@SqlType(StandardTypes.VARBINARY) Slice slice)\n {\n String encoded;\n if (slice.hasByteArray()) {\n encoded = BaseEncoding.base16().encode(slice....
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1170
{ "fields": [ { "declarator": "CATALOG_NAME = \"catalog\"", "modifier": "private static final", "original_string": "private static final String CATALOG_NAME = \"catalog\";", "type": "String", "var_name": "CATALOG_NAME" }, { "declarator": "executor = newCachedThreadPool(...
{ "body": "@Test\n public void test()\n {\n Session session = testSessionBuilder(metadata.getSessionPropertyManager())\n .setSystemProperty(\"foo\", \"bar\")\n .setCatalogSessionProperty(CATALOG_NAME, \"baz\", \"blah\")\n .build();\n\n QueryStateMachine...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/execution/ResetSessionTask.java", "identifier": "ResetSessionTask", "interfaces": "implements DataDefinitionTask<ResetSession>", "methods": [ { "class_method_signature": "ResetSessionTask.getName()", "constructor": false, "f...
{ "body": "@Override\n public ListenableFuture<?> execute(ResetSession statement, TransactionManager transactionManager, Metadata metadata, AccessControl accessControl, QueryStateMachine stateMachine, List<Expression> parameters)\n {\n List<String> parts = statement.getName().getParts();\n if (par...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1035
{ "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 testWithCaseInsensitiveResolution()\n {\n // TODO: verify output\n analyze(\"WITH AB AS (SELECT * FROM t1) SELECT * FROM ab\");\n }", "class_method_signature": "TestAnalyzer.testWithCaseInsensitiveResolution()", "constructor": false, "full_signature": "@Test...
{ "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_285
{ "fields": [], "file": "presto-thrift-api/src/test/java/io/prestosql/plugin/thrift/api/datatypes/TestPrestoThriftBigint.java", "identifier": "TestPrestoThriftBigint", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testReadBlockAllNullsOption1()\n {\n PrestoThriftBlock columnsData = longColumn(\n new boolean[] {true, true, true, true, true, true, true},\n null);\n Block actual = columnsData.toBlock(BIGINT);\n assertBlockEquals(actual, list(n...
{ "fields": [ { "declarator": "nulls", "modifier": "private final", "original_string": "private final boolean[] nulls;", "type": "boolean[]", "var_name": "nulls" }, { "declarator": "longs", "modifier": "private final", "original_string": "private final long[...
{ "body": "@Override\n public Block toBlock(Type desiredType)\n {\n checkArgument(BIGINT.equals(desiredType), \"type doesn't match: %s\", desiredType);\n int numberOfRecords = numberOfRecords();\n return new LongArrayBlock(\n numberOfRecords,\n Optional.ofNulla...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_905
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/optimizations/TestLocalProperties.java", "identifier": "TestLocalProperties", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGroupedDoubleThenSingle()\n {\n List<LocalProperty<String>> actual = builder()\n .grouped(\"a\", \"b\")\n .grouped(\"c\")\n .build();\n\n assertMatch(\n actual,\n builder().grouped(\"a\", ...
{ "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_456
{ "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 testNegate()\n {\n assertEquals(negate(negate(MIN_DECIMAL)), MIN_DECIMAL);\n assertEquals(negate(MIN_DECIMAL), MAX_DECIMAL);\n assertEquals(negate(MIN_DECIMAL), MAX_DECIMAL);\n\n assertEquals(negate(unscaledDecimal(1)), unscaledDecimal(-1));\n as...
{ "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 negate(Slice decimal)\n {\n setNegative(decimal, !isNegative(decimal));\n }", "class_method_signature": "UnscaledDecimal128Arithmetic.negate(Slice decimal)", "constructor": false, "full_signature": "public static void negate(Slice decimal)", "identifier": "negate", ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_513
{ "fields": [], "file": "presto-cli/src/test/java/io/prestosql/cli/TestClientOptions.java", "identifier": "TestClientOptions", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testServerHostPort()\n {\n Console console = createConsole(\"--server=test:8888\");\n ClientSession session = console.clientOptions.toClientSession();\n assertEquals(session.getServer().toString(), \"http://test:8888\");\n }", "class_method_signature": "T...
{ "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_143
{ "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 testCalculateRange()\n {\n assertEquals(calculateRange(VARCHAR, ImmutableList.of()), Optional.empty());\n assertEquals(calculateRange(VARCHAR, ImmutableList.of(integerRange(OptionalLong.empty(), OptionalLong.empty()))), Optional.empty());\n assertEquals(calcul...
{ "fields": [ { "declarator": "log = Logger.get(MetastoreHiveStatisticsProvider.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(MetastoreHiveStatisticsProvider.class);", "type": "Logger", "var_name": "log" }, { ...
{ "body": "@VisibleForTesting\n static Optional<DoubleRange> calculateRange(Type type, List<HiveColumnStatistics> columnStatistics)\n {\n return columnStatistics.stream()\n .map(statistics -> createRange(type, statistics))\n .filter(Optional::isPresent)\n .map...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1259
{ "fields": [ { "declarator": "SHORT_DECIMAL = createDecimalType(5, 2)", "modifier": "private static final", "original_string": "private static final Type SHORT_DECIMAL = createDecimalType(5, 2);", "type": "Type", "var_name": "SHORT_DECIMAL" }, { "declarator": "LONG_DEC...
{ "body": "@Test\n public void testDecimal()\n {\n assertEquals(getDomain(SHORT_DECIMAL, 0, null), none(SHORT_DECIMAL));\n assertEquals(getDomain(LONG_DECIMAL, 10, null), all(LONG_DECIMAL));\n\n assertEquals(getDomain(SHORT_DECIMAL, 0, decimalColumnStats(null, null, null)), none(SHORT_DECIM...
{ "fields": [ { "declarator": "columnDomains", "modifier": "private final", "original_string": "private final List<ColumnDomain> columnDomains;", "type": "List<ColumnDomain>", "var_name": "columnDomains" }, { "declarator": "orcBloomFiltersEnabled", "modifier": "pr...
{ "body": "@VisibleForTesting\n public static Domain getDomain(Type type, long rowCount, ColumnStatistics columnStatistics)\n {\n if (rowCount == 0) {\n return Domain.none(type);\n }\n\n if (columnStatistics == null) {\n return Domain.all(type);\n }\n\n i...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_35
{ "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 testTableRulesForCheckCanAddColumn()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-table.json\");\n\n accessControl.checkCanAddColumn(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 checkCanAddColumn(SystemSecurityContext context, CatalogSchemaTableName table)\n {\n if (!checkTablePermission(context, table, OWNERSHIP)) {\n denyAddColumn(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_840
{ "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 testToBase()\n {\n VarcharType toBaseReturnType = VarcharType.createVarcharType(64);\n assertFunction(\"to_base(2147483648, 16)\", toBaseReturnType, \"80000000\");\n assertFunction(\"to_base(255, 2)\", toBaseReturnType, \"11111111\");\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(\"Convert a number to a string in the given base\")\n @ScalarFunction\n @SqlType(\"varchar(64)\")\n public static Slice toBase(@SqlType(StandardTypes.BIGINT) long value, @SqlType(StandardTypes.BIGINT) long radix)\n {\n checkRadix(radix);\n return utf8Slice(Long.toStri...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_354
{ "fields": [ { "declarator": "ASIA_ORAL_ZONE = DateTimeZone.forID(\"Asia/Oral\")", "modifier": "private static final", "original_string": "private static final DateTimeZone ASIA_ORAL_ZONE = DateTimeZone.forID(\"Asia/Oral\");", "type": "DateTimeZone", "var_name": "ASIA_ORAL_ZONE" ...
{ "body": "@Test\n public void testStatementReuse()\n throws Exception\n {\n try (Connection connection = createConnection(\"blackhole\", \"blackhole\")) {\n try (Statement statement = connection.createStatement()) {\n // update statement\n assertFalse(...
{ "fields": [ { "declarator": "DRIVER_NAME = \"Presto JDBC Driver\"", "modifier": "static final", "original_string": "static final String DRIVER_NAME = \"Presto JDBC Driver\";", "type": "String", "var_name": "DRIVER_NAME" }, { "declarator": "DRIVER_VERSION", "modi...
{ "body": "@Override\n public void close()\n {\n httpClient.dispatcher().executorService().shutdown();\n httpClient.connectionPool().evictAll();\n }", "class_method_signature": "PrestoDriver.close()", "constructor": false, "full_signature": "@Override public void close()", "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_704
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestRealOperators.java", "identifier": "TestRealOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToBoolean()\n {\n assertFunction(\"CAST(REAL'754.1985' AS BOOLEAN)\", BOOLEAN, true);\n assertFunction(\"CAST(REAL'0.0' AS BOOLEAN)\", BOOLEAN, false);\n assertFunction(\"CAST(REAL'-0.0' AS BOOLEAN)\", BOOLEAN, false);\n assertFunction(\"CAST(RE...
{ "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.BOOLEAN)\n public static boolean castToBoolean(@SqlType(StandardTypes.REAL) long value)\n {\n return intBitsToFloat((int) value) != 0.0f;\n }", "class_method_signature": "RealOperators.castToBoolean(@SqlType(StandardTypes.REAL) long value)...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_211
{ "fields": [ { "declarator": "DUMMY_COMPARATOR = (o1, o2) -> 0", "modifier": "private static final", "original_string": "private static final Comparator<Runnable> DUMMY_COMPARATOR = (o1, o2) -> 0;", "type": "Comparator<Runnable>", "var_name": "DUMMY_COMPARATOR" }, { "d...
{ "body": "@Test\n public void testCounter()\n throws Exception\n {\n // enforce single thread\n PrioritizedFifoExecutor<Runnable> executor = new PrioritizedFifoExecutor<>(this.executor, 1, DUMMY_COMPARATOR);\n\n int totalTasks = 100_000;\n AtomicInteger counter = new Atom...
{ "fields": [ { "declarator": "log = Logger.get(PrioritizedFifoExecutor.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(PrioritizedFifoExecutor.class);", "type": "Logger", "var_name": "log" }, { "declarator":...
{ "body": "public ListenableFuture<?> submit(T task)\n {\n FifoRunnableTask<T> fifoTask = new FifoRunnableTask<>(task, sequenceNumber.incrementAndGet(), taskComparator);\n queue.add(fifoTask);\n executorService.submit(triggerTask);\n return fifoTask;\n }", "class_method_signature":...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_641
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestDoubleOperators.java", "identifier": "TestDoubleOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testCastToVarchar()\n {\n assertFunction(\"cast(37.7E0 as varchar)\", VARCHAR, \"37.7\");\n assertFunction(\"cast(17.1E0 as varchar)\", VARCHAR, \"17.1\");\n assertFunction(\"cast(0E0/0E0 as varchar)\", VARCHAR, \"NaN\");\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "MIN_INTEGER_AS_DOUBLE = -0x1p31", "modifier": "private static final", "original_string": "private static final double MIN_INTEGER_AS_DOUBLE = -0x1p31;", "type": "double", "var_name": "MIN_INTEGER_AS_DOUBLE" }, { "declarator": "MAX_INTEGER_...
{ "body": "@ScalarOperator(CAST)\n @LiteralParameters(\"x\")\n @SqlType(\"varchar(x)\")\n public static Slice castToVarchar(@SqlType(StandardTypes.DOUBLE) double value)\n {\n return utf8Slice(String.valueOf(value));\n }", "class_method_signature": "DoubleOperators.castToVarchar(@SqlType(Standa...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_568
{ "fields": [], "file": "presto-base-jdbc/src/test/java/io/prestosql/plugin/jdbc/TestTypeHandlingJdbcConfig.java", "identifier": "TestTypeHandlingJdbcConfig", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExplicitPropertyMappings()\n {\n Map<String, String> properties = new ImmutableMap.Builder<String, String>()\n .put(\"unsupported-type-handling\", \"CONVERT_TO_VARCHAR\")\n .build();\n\n TypeHandlingJdbcConfig expected = new TypeHand...
{ "fields": [ { "declarator": "unsupportedTypeHandling = UnsupportedTypeHandling.IGNORE", "modifier": "private", "original_string": "private UnsupportedTypeHandling unsupportedTypeHandling = UnsupportedTypeHandling.IGNORE;", "type": "UnsupportedTypeHandling", "var_name": "unsupported...
{ "body": "@Config(\"unsupported-type-handling\")\n @LegacyConfig(\"unsupported-type.handling-strategy\")\n @ConfigDescription(\"Unsupported type handling strategy\")\n public TypeHandlingJdbcConfig setUnsupportedTypeHandling(UnsupportedTypeHandling unsupportedTypeHandling)\n {\n this.unsupportedTy...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_138
{ "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 testConvertPartitionValueToDouble()\n {\n assertConvertPartitionValueToDouble(BIGINT, \"123456\", 123456);\n assertConvertPartitionValueToDouble(INTEGER, \"12345\", 12345);\n assertConvertPartitionValueToDouble(SMALLINT, \"1234\", 1234);\n assertConvert...
{ "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": "public static OptionalDouble convertPartitionValueToDouble(Type type, Object value)\n {\n if (type.equals(BIGINT) || type.equals(INTEGER) || type.equals(SMALLINT) || type.equals(TINYINT)) {\n return OptionalDouble.of((Long) value);\n }\n if (type.equals(DOUBLE)) {\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_991
{ "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 testUnion()\n {\n ImmutableListMultimap<Symbol, Symbol> symbolMapping = ImmutableListMultimap.of(A, B, A, C, A, E);\n PlanNode node = new UnionNode(\n newId(),\n ImmutableList.of(\n filter(baseTableScan, greaterTha...
{ "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_1222
{ "fields": [ { "declarator": "OUT = new OutputBufferId(0)", "modifier": "public static final", "original_string": "public static final OutputBufferId OUT = new OutputBufferId(0);", "type": "OutputBufferId", "var_name": "OUT" }, { "declarator": "CONNECTOR_ID = TEST_TABL...
{ "body": "@Test\n public void testScheduleSlowSplitSource()\n {\n QueuedSplitSource queuedSplitSource = new QueuedSplitSource(TestingSplit::createRemoteSplit);\n StageExecutionPlan plan = createPlan(queuedSplitSource);\n NodeTaskMap nodeTaskMap = new NodeTaskMap(finalizerService);\n ...
{ "fields": [ { "declarator": "stage", "modifier": "private final", "original_string": "private final SqlStageExecution stage;", "type": "SqlStageExecution", "var_name": "stage" }, { "declarator": "splitSource", "modifier": "private final", "original_string"...
{ "body": "@Override\n public synchronized ScheduleResult schedule()\n {\n dropListenersFromWhenFinishedOrNewLifespansAdded();\n\n int overallSplitAssignmentCount = 0;\n ImmutableSet.Builder<RemoteTask> overallNewTasks = ImmutableSet.builder();\n List<ListenableFuture<?>> overallBloc...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_587
{ "fields": [ { "declarator": "database", "modifier": "private", "original_string": "private TestingDatabase database;", "type": "TestingDatabase", "var_name": "database" }, { "declarator": "jdbcClient", "modifier": "private", "original_string": "private Jdb...
{ "body": "@Test\n public void testCursorSimple()\n {\n RecordSet recordSet = createRecordSet(ImmutableList.of(\n columnHandles.get(\"text\"),\n columnHandles.get(\"text_short\"),\n columnHandles.get(\"value\")));\n\n try (RecordCursor cursor = recordSe...
{ "fields": [ { "declarator": "jdbcClient", "modifier": "private final", "original_string": "private final JdbcClient jdbcClient;", "type": "JdbcClient", "var_name": "jdbcClient" }, { "declarator": "table", "modifier": "private final", "original_string": "pr...
{ "body": "@Override\n public RecordCursor cursor()\n {\n return new JdbcRecordCursor(jdbcClient, session, split, table, columnHandles);\n }", "class_method_signature": "JdbcRecordSet.cursor()", "constructor": false, "full_signature": "@Override public RecordCursor cursor()", "identifier": "cu...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_753
{ "fields": [ { "declarator": "scheduler", "modifier": "private", "original_string": "private ScheduledExecutorService scheduler;", "type": "ScheduledExecutorService", "var_name": "scheduler" }, { "declarator": "pageBufferClientCallbackExecutor", "modifier": "priv...
{ "body": "@Test\n public void testMemoryExceededInAddPages()\n throws Exception\n {\n URI location = URI.create(\"http://localhost:8080\");\n Page page = new Page(RunLengthEncodedBlock.create(BIGINT, 1L, 100));\n\n MockExchangeRequestProcessor processor = new MockExchangeRequest...
{ "fields": [ { "declarator": "log = Logger.get(HttpPageBufferClient.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(HttpPageBufferClient.class);", "type": "Logger", "var_name": "log" }, { "declarator": "self...
{ "body": "public synchronized void scheduleRequest()\n {\n if (closed || (future != null) || scheduled) {\n return;\n }\n scheduled = true;\n\n // start before scheduling to include error delay\n backoff.startRequest();\n\n long delayNanos = backoff.getBackoffD...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_303
{ "fields": [ { "declarator": "RUNTIME_OBJECT = \"java.lang:type=Runtime\"", "modifier": "private static final", "original_string": "private static final String RUNTIME_OBJECT = \"java.lang:type=Runtime\";", "type": "String", "var_name": "RUNTIME_OBJECT" }, { "declarato...
{ "body": "@Test\n public void testListTables()\n {\n assertTrue(metadata.listTables(SESSION, Optional.of(JMX_SCHEMA_NAME)).contains(RUNTIME_TABLE));\n assertTrue(metadata.listTables(SESSION, Optional.of(HISTORY_SCHEMA_NAME)).contains(RUNTIME_HISTORY_TABLE));\n }", "class_method_signature": "...
{ "fields": [ { "declarator": "LOGGER = Logger.get(JmxMetadata.class)", "modifier": "private static final", "original_string": "private static final Logger LOGGER = Logger.get(JmxMetadata.class);", "type": "Logger", "var_name": "LOGGER" }, { "declarator": "JMX_SCHEMA_NA...
{ "body": "@Override\n public List<SchemaTableName> listTables(ConnectorSession session, Optional<String> schemaName)\n {\n Set<String> schemaNames = schemaName.map(ImmutableSet::of)\n .orElseGet(() -> ImmutableSet.copyOf(listSchemaNames(session)));\n ImmutableList.Builder<SchemaTab...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1019
{ "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 testDistinctAggregations()\n {\n analyze(\"SELECT COUNT(DISTINCT a), SUM(a) FROM t1\");\n }", "class_method_signature": "TestAnalyzer.testDistinctAggregations()", "constructor": false, "full_signature": "@Test public void testDistinctAggregations()", "identifier"...
{ "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_616
{ "fields": [ { "declarator": "lowMemoryKiller = new TotalReservationOnBlockedNodesLowMemoryKiller()", "modifier": "private final", "original_string": "private final LowMemoryKiller lowMemoryKiller = new TotalReservationOnBlockedNodesLowMemoryKiller();", "type": "LowMemoryKiller", "v...
{ "body": "@Test\n public void testGeneralPoolNotBlocked()\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\", 6L, \"n3\", 0L, \"n4...
{ "fields": [], "file": "presto-main/src/main/java/io/prestosql/memory/TotalReservationOnBlockedNodesLowMemoryKiller.java", "identifier": "TotalReservationOnBlockedNodesLowMemoryKiller", "interfaces": "implements LowMemoryKiller", "methods": [ { "class_method_signature": "TotalReservationOnBlockedNo...
{ "body": "@Override\n public Optional<QueryId> chooseQueryToKill(List<QueryMemoryInfo> runningQueries, List<MemoryInfo> nodes)\n {\n Map<QueryId, Long> memoryReservationOnBlockedNodes = new HashMap<>();\n for (MemoryInfo node : nodes) {\n MemoryPoolInfo generalPool = node.getPools().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_246
{ "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 testRewriteNoRowsDeleted()\n throws Exception\n {\n List<Long> columnIds = ImmutableList.of(3L);\n List<Type> columnTypes = ImmutableList.of(BIGINT);\n\n File file = new File(temporary, randomUUID().toString());\n try (OrcFileWriter writer = ...
{ "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_19
{ "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 testSchemaRulesForCheckCanDropSchema()\n {\n SystemAccessControl accessControl = newFileBasedSystemAccessControl(\"file-based-system-access-schema.json\");\n\n accessControl.checkCanDropSchema(ADMIN, new CatalogSchemaName(\"some-catalog\", \"bob\"));\n accessC...
{ "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 checkCanDropSchema(SystemSecurityContext context, CatalogSchemaName schema)\n {\n if (!isSchemaOwner(context, schema)) {\n denyDropSchema(schema.toString());\n }\n }", "class_method_signature": "FileBasedSystemAccessControl.checkCanDropSchema(Syst...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1275
{ "fields": [], "file": "presto-parquet/src/test/java/io/prestosql/parquet/TestParquetTimestampUtils.java", "identifier": "TestParquetTimestampUtils", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testInvalidBinaryLength()\n {\n try {\n byte[] invalidLengthBinaryTimestamp = new byte[8];\n decode(Binary.fromByteArray(invalidLengthBinaryTimestamp));\n }\n catch (PrestoException e) {\n assertEquals(e.getErrorCode(), NOT_SUP...
{ "fields": [ { "declarator": "JULIAN_EPOCH_OFFSET_DAYS = 2_440_588", "modifier": "@VisibleForTesting\n static final", "original_string": "@VisibleForTesting\n static final int JULIAN_EPOCH_OFFSET_DAYS = 2_440_588;", "type": "int", "var_name": "JULIAN_EPOCH_OFFSET_DAYS" } ...
{ "body": "public static DecodedTimestamp decode(Binary timestampBinary)\n {\n if (timestampBinary.length() != 12) {\n throw new PrestoException(NOT_SUPPORTED, \"Parquet timestamp must be 12 bytes, actual \" + timestampBinary.length());\n }\n byte[] bytes = timestampBinary.getBytes(...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_495
{ "fields": [], "file": "presto-spi/src/test/java/io/prestosql/spi/predicate/TestDomain.java", "identifier": "TestDomain", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSubtract()\n {\n assertEquals(\n Domain.all(BIGINT).subtract(Domain.all(BIGINT)),\n Domain.none(BIGINT));\n assertEquals(\n Domain.all(BIGINT).subtract(Domain.none(BIGINT)),\n Domain.all(BIGINT));\n ...
{ "fields": [ { "declarator": "DEFAULT_COMPACTION_THRESHOLD = 32", "modifier": "public static final", "original_string": "public static final int DEFAULT_COMPACTION_THRESHOLD = 32;", "type": "int", "var_name": "DEFAULT_COMPACTION_THRESHOLD" }, { "declarator": "values", ...
{ "body": "public Domain subtract(Domain other)\n {\n checkCompatibility(other);\n return new Domain(values.subtract(other.getValues()), this.isNullAllowed() && !other.isNullAllowed());\n }", "class_method_signature": "Domain.subtract(Domain other)", "constructor": false, "full_signature": "...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_180
{ "fields": [], "file": "presto-hive/src/test/java/io/prestosql/plugin/hive/TestTableToPartitionMapping.java", "identifier": "TestTableToPartitionMapping", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsOneToOneMapping()\n {\n assertTrue(isIdentityMapping(ImmutableMap.<Integer, Integer>builder()\n .put(0, 0)\n .put(1, 1)\n .put(2, 2)\n .put(3, 3)\n .build()));\n assertFalse(isIdentityMa...
{ "fields": [ { "declarator": "INSTANCE_SIZE = ClassLayout.parseClass(TableToPartitionMapping.class).instanceSize()", "modifier": "private static final", "original_string": "private static final int INSTANCE_SIZE = ClassLayout.parseClass(TableToPartitionMapping.class).instanceSize();", "ty...
{ "body": "@VisibleForTesting\n static boolean isIdentityMapping(Map<Integer, Integer> map)\n {\n for (int i = 0; i < map.size(); i++) {\n if (!Objects.equals(map.get(i), i)) {\n return false;\n }\n }\n return true;\n }", "class_method_signature": "...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_929
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/sql/planner/TestLogicalPlanner.java", "identifier": "TestLogicalPlanner", "interfaces": "", "superclass": "extends BasePlanTest" }
{ "body": "@Test\n public void testRedundantLimitNodeRemoval()\n {\n String query = \"SELECT count(*) FROM orders LIMIT 10\";\n assertFalse(\n searchFrom(plan(query, OPTIMIZED).getRoot())\n .where(LimitNode.class::isInstance)\n .matches(...
{ "fields": [ { "declarator": "idAllocator", "modifier": "private final", "original_string": "private final PlanNodeIdAllocator idAllocator;", "type": "PlanNodeIdAllocator", "var_name": "idAllocator" }, { "declarator": "session", "modifier": "private final", ...
{ "body": "public Plan plan(Analysis analysis)\n {\n return plan(analysis, OPTIMIZED_AND_VALIDATED);\n }", "class_method_signature": "LogicalPlanner.plan(Analysis analysis)", "constructor": false, "full_signature": "public Plan plan(Analysis analysis)", "identifier": "plan", "invocations": [ ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_883
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java", "identifier": "TestStringFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testTranslate()\n {\n assertFunction(\"translate('abcd', '', '')\", VARCHAR, \"abcd\");\n assertFunction(\"translate('abcd', 'a', 'z')\", VARCHAR, \"zbcd\");\n assertFunction(\"translate('abcda', 'a', 'z')\", VARCHAR, \"zbcdz\");\n\n assertFunction(\"tr...
{ "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(\"Translate characters from the source string based on original and translations strings\")\n @ScalarFunction\n @LiteralParameters({\"x\", \"y\", \"z\"})\n @SqlType(StandardTypes.VARCHAR)\n public static Slice translate(@SqlType(\"varchar(x)\") Slice source, @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_315
{ "fields": [ { "declarator": "exampleHttpServer", "modifier": "private", "original_string": "private ExampleHttpServer exampleHttpServer;", "type": "ExampleHttpServer", "var_name": "exampleHttpServer" }, { "declarator": "dataUri", "modifier": "private", "or...
{ "body": "@Test\n public void testGetColumnTypes()\n {\n RecordSet recordSet = new ExampleRecordSet(new ExampleSplit(dataUri), ImmutableList.of(\n new ExampleColumnHandle(\"text\", createUnboundedVarcharType(), 0),\n new ExampleColumnHandle(\"value\", BIGINT, 1)));\n ...
{ "fields": [ { "declarator": "columnHandles", "modifier": "private final", "original_string": "private final List<ExampleColumnHandle> columnHandles;", "type": "List<ExampleColumnHandle>", "var_name": "columnHandles" }, { "declarator": "columnTypes", "modifier": ...
{ "body": "@Override\n public List<Type> getColumnTypes()\n {\n return columnTypes;\n }", "class_method_signature": "ExampleRecordSet.getColumnTypes()", "constructor": false, "full_signature": "@Override public List<Type> getColumnTypes()", "identifier": "getColumnTypes", "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_745
{ "fields": [ { "declarator": "executor", "modifier": "private", "original_string": "private ExecutorService executor;", "type": "ExecutorService", "var_name": "executor" }, { "declarator": "scheduledExecutor", "modifier": "private", "original_string": "priv...
{ "body": "@Test\n public void testLimitZero()\n throws Exception\n {\n OperatorFactory factory = topNOperatorFactory(\n ImmutableList.of(BIGINT),\n 0,\n ImmutableList.of(0),\n ImmutableList.of(DESC_NULLS_LAST));\n\n try (Opera...
{ "fields": [ { "declarator": "topNProcessor", "modifier": "private final", "original_string": "private final TopNProcessor topNProcessor;", "type": "TopNProcessor", "var_name": "topNProcessor" }, { "declarator": "pages", "modifier": "private final", "origin...
{ "body": "@Override\n public boolean needsInput()\n {\n return pageBuffer.isEmpty() && !pageBuffer.isFinished();\n }", "class_method_signature": "TopNOperator.needsInput()", "constructor": false, "full_signature": "@Override public boolean needsInput()", "identifier": "needsInput", "invocat...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_250
{ "fields": [ { "declarator": "UTC_CHRONOLOGY = ISOChronology.getInstanceUTC()", "modifier": "private static final", "original_string": "private static final ISOChronology UTC_CHRONOLOGY = ISOChronology.getInstanceUTC();", "type": "ISOChronology", "var_name": "UTC_CHRONOLOGY" }, ...
{ "body": "@Test\n public void testWriterRollback()\n {\n // verify staging directory is empty\n File staging = new File(new File(temporary, \"data\"), \"staging\");\n assertDirectory(staging);\n assertEquals(staging.list(), new String[] {});\n\n // create a shard in staging\n...
{ "fields": [ { "declarator": "SHARD_DELTA_CODEC = jsonCodec(ShardDelta.class)", "modifier": "private static final", "original_string": "private static final JsonCodec<ShardDelta> SHARD_DELTA_CODEC = jsonCodec(ShardDelta.class);", "type": "JsonCodec<ShardDelta>", "var_name": "SHARD_D...
{ "body": "@Override\n public StoragePageSink createStoragePageSink(long transactionId, OptionalInt bucketNumber, List<Long> columnIds, List<Type> columnTypes, boolean checkSpace)\n {\n if (checkSpace && storageService.getAvailableBytes() < minAvailableSpace.toBytes()) {\n throw new PrestoExce...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_600
{ "fields": [ { "declarator": "codec = JsonCodec.jsonCodec(MongoSplit.class)", "modifier": "private final", "original_string": "private final JsonCodec<MongoSplit> codec = JsonCodec.jsonCodec(MongoSplit.class);", "type": "JsonCodec<MongoSplit>", "var_name": "codec" } ], "file...
{ "body": "@Test\n public void testJsonRoundTrip()\n {\n MongoSplit expected = new MongoSplit(ImmutableList.of());\n\n String json = codec.toJson(expected);\n MongoSplit actual = codec.fromJson(json);\n\n assertEquals(actual.getAddresses(), ImmutableList.of());\n }", "class_meth...
{ "fields": [ { "declarator": "addresses", "modifier": "private final", "original_string": "private final List<HostAddress> addresses;", "type": "List<HostAddress>", "var_name": "addresses" } ], "file": "presto-mongodb/src/main/java/io/prestosql/plugin/mongodb/MongoSplit.java...
{ "body": "@Override\n @JsonProperty\n public List<HostAddress> getAddresses()\n {\n return addresses;\n }", "class_method_signature": "MongoSplit.getAddresses()", "constructor": false, "full_signature": "@Override @JsonProperty public List<HostAddress> getAddresses()", "identifier": "getAd...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_529
{ "fields": [], "file": "presto-verifier/src/test/java/io/prestosql/verifier/TestValidator.java", "identifier": "TestValidator", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDoubleComparison()\n {\n assertEquals(precisionCompare(0.9045, 0.9045000000000001, 3), 0);\n assertEquals(precisionCompare(0.9045, 0.9045000000000001, 2), 0);\n assertEquals(precisionCompare(0.9041, 0.9042, 3), 0);\n assertEquals(precisionCompare(0....
{ "fields": [ { "declarator": "log = Logger.get(Validator.class)", "modifier": "private static final", "original_string": "private static final Logger log = Logger.get(Validator.class);", "type": "Logger", "var_name": "log" }, { "declarator": "testUsername", "modi...
{ "body": "@VisibleForTesting\n static int precisionCompare(double a, double b, int precision)\n {\n //we don't care whether a is smaller than b or not when they are not close since we will fail verification anyway\n return isClose(a, b, Math.pow(10, -1 * (precision - 1))) ? 0 : -1;\n }", "cl...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_483
{ "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 testOverlaps()\n {\n assertTrue(overlaps(\n ImmutableMap.of(),\n ImmutableMap.of()));\n\n assertTrue(overlaps(\n ImmutableMap.of(),\n ImmutableMap.of(A, Domain.singleValue(BIGINT, 0L))));\n\n assertFa...
{ "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 overlaps(TupleDomain<T> other)\n {\n return !this.intersect(other).isNone();\n }", "class_method_signature": "TupleDomain.overlaps(TupleDomain<T> other)", "constructor": false, "full_signature": "public boolean overlaps(TupleDomain<T> other)", "identifier": "overlaps", ...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_179
{ "fields": [ { "declarator": "BUCKET_COUNT = 2", "modifier": "private static final", "original_string": "private static final int BUCKET_COUNT = 2;", "type": "int", "var_name": "BUCKET_COUNT" }, { "declarator": "TIMESTAMP_PRECISION = 3", "modifier": "private stat...
{ "body": "@Test\n public void testValidateFileBuckets()\n {\n ListMultimap<Integer, LocatedFileStatus> bucketFiles = ArrayListMultimap.create();\n bucketFiles.put(1, null);\n bucketFiles.put(3, null);\n bucketFiles.put(4, null);\n bucketFiles.put(6, null);\n bucketFile...
{ "fields": [ { "declarator": "BUCKET_WITH_OPTIONAL_ATTEMPT_ID_PATTERN = Pattern.compile(\"bucket_(\\\\d+)(_\\\\d+)?$\")", "modifier": "private static final", "original_string": "private static final Pattern BUCKET_WITH_OPTIONAL_ATTEMPT_ID_PATTERN = Pattern.compile(\"bucket_(\\\\d+)(_\\\\d+)?$\"...
{ "body": "@VisibleForTesting\n static void validateFileBuckets(ListMultimap<Integer, LocatedFileStatus> bucketFiles, int partitionBucketCount, String tableName, String partitionName)\n {\n if (bucketFiles.isEmpty()) {\n return;\n }\n\n int highestBucketNumber = max(bucketFiles.k...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1263
{ "fields": [], "file": "presto-bigquery/src/test/java/io/prestosql/plugin/bigquery/TestBigQueryPlugin.java", "identifier": "TestBigQueryPlugin", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStartup()\n {\n BigQueryPlugin plugin = new BigQueryPlugin();\n ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());\n assertInstanceOf(factory, BigQueryConnectorFactory.class);\n }", "class_method_signature": "TestBigQueryPlugin...
{ "fields": [], "file": "presto-bigquery/src/main/java/io/prestosql/plugin/bigquery/BigQueryPlugin.java", "identifier": "BigQueryPlugin", "interfaces": "implements Plugin", "methods": [ { "class_method_signature": "BigQueryPlugin.getConnectorFactories()", "constructor": false, "full_sign...
{ "body": "@Override\n public Iterable<ConnectorFactory> getConnectorFactories()\n {\n return ImmutableList.of(new BigQueryConnectorFactory());\n }", "class_method_signature": "BigQueryPlugin.getConnectorFactories()", "constructor": false, "full_signature": "@Override public Iterable<ConnectorFa...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_895
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/operator/scalar/TestColorFunctions.java", "identifier": "TestColorFunctions", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testInterpolate()\n {\n assertEquals(color(0, 0, 255, color(toSlice(\"#000\")), color(toSlice(\"#fff\"))), 0x00_00_00);\n assertEquals(color(0.0f, 0.0f, 255.0f, color(toSlice(\"#000\")), color(toSlice(\"#fff\"))), 0x00_00_00);\n assertEquals(color(128, 0, 255,...
{ "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": "private static int interpolate(float fraction, long lowRgb, long highRgb)\n {\n float[] lowHsv = Color.RGBtoHSB(getRed(lowRgb), getGreen(lowRgb), getBlue(lowRgb), null);\n float[] highHsv = Color.RGBtoHSB(getRed(highRgb), getGreen(highRgb), getBlue(highRgb), null);\n\n float h = fra...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_196
{ "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(description = \"Test principal name for real, yo!\")\n void createAuthenticatedPrincipalRealSuccess()\n {\n // Skip this test if SALESFORCE_TEST_FORREAL is not set to TRUE.\n if (!forReal) {\n throw new SkipException(\"Skipping real tests.\");\n }\n\n Stri...
{ "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_712
{ "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 testSelectsMultipleChoiceWithBlockPosition()\n throws Throwable\n {\n Signature signature = Signature.builder()\n .operatorType(IS_DISTINCT_FROM)\n .argumentTypes(DECIMAL_SIGNATURE, DECIMAL_SIGNATURE)\n .returnType(BOO...
{ "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_342
{ "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 testGetTables()\n throws Exception\n {\n try (Connection connection = createConnection()) {\n try (ResultSet rs = connection.getMetaData().getTables(null, null, null, null)) {\n assertTableMetadata(rs);\n assertThat(readRo...
{ "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 getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types)\n throws SQLException\n {\n StringBuilder query = new StringBuilder(\"\" +\n \"SELECT TABLE_CAT, TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, REMARKS,\\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_1058
{ "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 testStoredViewResolution()\n {\n // the view must be analyzed relative to its own catalog/schema\n analyze(\"SELECT * FROM c3.s3.v3\");\n }", "class_method_signature": "TestAnalyzer.testStoredViewResolution()", "constructor": false, "full_signature": "@Test ...
{ "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_657
{ "fields": [], "file": "presto-main/src/test/java/io/prestosql/type/TestTinyintOperators.java", "identifier": "TestTinyintOperators", "interfaces": "", "superclass": "extends AbstractTestFunctions" }
{ "body": "@Test\n public void testModulus()\n {\n assertFunction(\"TINYINT'37' % TINYINT'37'\", TINYINT, (byte) 0);\n assertFunction(\"TINYINT'37' % TINYINT'17'\", TINYINT, (byte) (37 % 17));\n assertFunction(\"TINYINT'17' % TINYINT'37'\", TINYINT, (byte) (17 % 37));\n assertFunctio...
{ "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(MODULUS)\n @SqlType(StandardTypes.TINYINT)\n public static long modulus(@SqlType(StandardTypes.TINYINT) long left, @SqlType(StandardTypes.TINYINT) long right)\n {\n try {\n return left % right;\n }\n catch (ArithmeticException e) {\n throw...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_207
{ "fields": [], "file": "presto-raptor-legacy/src/test/java/io/prestosql/plugin/raptor/legacy/TestRaptorBucketFunction.java", "identifier": "TestRaptorBucketFunction", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testBigint()\n {\n BucketFunction function = bucketFunction(50, BIGINT);\n assertEquals(getBucket(function, createLongsBlock(123456789012L)), 12);\n assertEquals(getBucket(function, createLongsBlock(454345325)), 16);\n assertEquals(getBucket(function, c...
{ "fields": [ { "declarator": "functions", "modifier": "private final", "original_string": "private final HashFunction[] functions;", "type": "HashFunction[]", "var_name": "functions" }, { "declarator": "bucketCount", "modifier": "private final", "original_s...
{ "body": "@SuppressWarnings(\"NumericCastThatLosesPrecision\")\n @Override\n public int getBucket(Page page, int position)\n {\n long hash = 0;\n for (int i = 0; i < page.getChannelCount(); i++) {\n Block block = page.getBlock(i);\n long value = functions[i].hash(block, p...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_58
{ "fields": [ { "declarator": "typeManager = new InternalTypeManager(createTestMetadataManager(), new TypeOperators())", "modifier": "private final", "original_string": "private final TypeManager typeManager = new InternalTypeManager(createTestMetadataManager(), new TypeOperators());", "ty...
{ "body": "@Test\n public void testEmptyColumns()\n {\n IonSqlQueryBuilder queryBuilder = new IonSqlQueryBuilder(typeManager);\n assertEquals(\"SELECT ' ' FROM S3Object s\", queryBuilder.buildSql(ImmutableList.of(), TupleDomain.all()));\n }", "class_method_signature": "TestIonSqlQueryBuilder....
{ "fields": [ { "declarator": "FORMATTER = date().withChronology(getInstanceUTC())", "modifier": "private static final", "original_string": "private static final DateTimeFormatter FORMATTER = date().withChronology(getInstanceUTC());", "type": "DateTimeFormatter", "var_name": "FORMATT...
{ "body": "public String buildSql(List<HiveColumnHandle> columns, TupleDomain<HiveColumnHandle> tupleDomain)\n {\n columns.forEach(column -> checkArgument(column.isBaseColumn(), \"%s is not a base column\", column));\n tupleDomain.getDomains().ifPresent(domains -> {\n domains.keySet().forE...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_1234
{ "fields": [], "file": "presto-pinot/src/test/java/io/prestosql/pinot/query/TestDynamicTable.java", "identifier": "TestDynamicTable", "interfaces": "", "superclass": "extends TestPinotQueryBase" }
{ "body": "@Test\n public void testFilter()\n {\n String tableName = realtimeOnlyTable.getTableName();\n String query = format(\"select FlightNum, AirlineID from realtimeonly where (((CancellationCode IN ('strike', 'weather', 'pilot_bac')) AND (Origin = 'jfk')) \" +\n \"OR (...
{ "fields": [ { "declarator": "tableName", "modifier": "private final", "original_string": "private final String tableName;", "type": "String", "var_name": "tableName" }, { "declarator": "suffix", "modifier": "private final", "original_string": "private fina...
{ "body": "@JsonProperty\n public String getTableName()\n {\n return tableName;\n }", "class_method_signature": "DynamicTable.getTableName()", "constructor": false, "full_signature": "@JsonProperty public String getTableName()", "identifier": "getTableName", "invocations": [], "modifiers":...
{ "created": "1/19/2019 6:38:14 AM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 166515022, "size": null, "stargazer_count": null, "stars": 849, "updates": "2020-01-27T22:04:31+00:00", "url": "https://github.com/prestosql/prest...
166515022_987
{ "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 testSort()\n {\n PlanNode node = new SortNode(\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_591
{ "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 testS3SecurityMappingAndHiveCachingMutuallyExclusive()\n throws IOException\n {\n Path mappingConfig = Files.createTempFile(null, null);\n Plugin plugin = new HiveHadoop2Plugin();\n ConnectorFactory connectorFactory = Iterables.getOnlyElement(plugin...
{ "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_968
{ "fields": [ { "declarator": "zeroRewriter = new ExpressionRewriteRuleSet(\n (expression, context) -> new LongLiteral(\"0\"))", "modifier": "private", "original_string": "private ExpressionRewriteRuleSet zeroRewriter = new ExpressionRewriteRuleSet(\n (expression, context) ...
{ "body": "@Test\n public void testAggregationExpressionRewrite()\n {\n ExpressionRewriteRuleSet functionCallRewriter = new ExpressionRewriteRuleSet((expression, context) -> new FunctionCallBuilder(tester().getMetadata())\n .setName(QualifiedName.of(\"count\"))\n .addArgumen...
{ "fields": [ { "declarator": "rewriter", "modifier": "private final", "original_string": "private final ExpressionRewriter rewriter;", "type": "ExpressionRewriter", "var_name": "rewriter" } ], "file": "presto-main/src/main/java/io/prestosql/sql/planner/iterative/rule/Express...
{ "body": "public Rule<?> aggregationExpressionRewrite()\n {\n return new AggregationExpressionRewrite(rewriter);\n }", "class_method_signature": "ExpressionRewriteRuleSet.aggregationExpressionRewrite()", "constructor": false, "full_signature": "public Rule<?> aggregationExpressionRewrite()", "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...
25573964_19
{ "fields": [ { "declarator": "server = new KubernetesMockServer()", "modifier": "private static final", "original_string": "private static final KubernetesMockServer server = new KubernetesMockServer();", "type": "KubernetesMockServer", "var_name": "server" }, { "decla...
{ "body": "@Test\n public void should_report_environment_dependencies_from_file_url_and_configuration_from_default_location()\n throws IOException {\n //given\n String resouceName = getResourceURL(SERVICES_FILE_NAME) + \",\" + getResourceURL(REPLICATION_CONTROLLER_FILE_NAME);\n Configur...
{ "fields": [ { "declarator": "sectionEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<SectionEvent> sectionEvent;", "type": "Event<SectionEvent>", "var_name": "sectionEvent" }, { "declarator": "dependencyResolver", "modifier": "@Inject", ...
{ "body": "public void reportKubernetesConfiguration(@Observes Start start, Configuration configuration,\n org.arquillian.reporter.config.ReporterConfiguration reporterConfiguration) throws IOException {\n final ReportBuilder reportBuilder = Reporter.createReport(CONFIGURATION);\n Session session...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_58
{ "fields": [ { "declarator": "ID = \"test\"", "modifier": "private static final", "original_string": "private static final String ID = \"test\";", "type": "String", "var_name": "ID" }, { "declarator": "executor", "modifier": "@Mock\n private", "original_...
{ "body": "@Test\n public void shouldNotFireLifecycleEventsIfTryingToStopAlreadyStoppedCube() {\n // given\n cube.stop();\n\n // when\n cube.stop();\n\n // then - event count is 1 which is for first cube.stop()\n assertEventFired(BeforeStop.class, 1);\n assertEvent...
{ "fields": [ { "declarator": "log = Logger.getLogger(DockerCube.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(DockerCube.class.getName());", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "@Override\n public void stop() throws CubeControlException {\n if (state == State.STOPPED || state == State.PRE_RUNNING || state == State.DESTROYED) {\n return;\n }\n try {\n lifecycle.fire(new BeforeStop(id));\n\n long currentTime = System.currentTi...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_102
{ "fields": [ { "declarator": "SIMPLE_SCENARIO =\n \"helloworld:\\n\" +\n \" image: dockercloud/hello-world\\n\" +\n \" portBindings: [8080->80/tcp]\"", "modifier": "private static final", "original_string": "private static final String SIMPLE_SCENARIO =\n \...
{ "body": "@Test\n public void should_autoresolve_port() {\n RestAssuredCustomizer restAssuredCustomizer = new RestAssuredCustomizer();\n\n Map<String, String> conf = new HashMap<>();\n conf.put(\"baseUri\", \"http://localhost\");\n\n final RestAssuredConfiguration restAssuredConfigurat...
{ "fields": [ { "declarator": "cubeDockerConfigurationInstance", "modifier": "@Inject", "original_string": "@Inject\n Instance<CubeDockerConfiguration> cubeDockerConfigurationInstance;", "type": "Instance<CubeDockerConfiguration>", "var_name": "cubeDockerConfigurationInstance" ...
{ "body": "void configureRequestSpecBuilder(@Observes RestAssuredConfiguration restAssuredConfiguration,\n CubeDockerConfiguration cubeDockerConfiguration, RequestSpecBuilder requestSpecBuilder) {\n if (restAssuredConfiguration.isBaseUriSet()) {\n requestSpecBuilder.setBaseUri(restAssuredConf...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_74
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/client/DockerContainerDefinitionParserTest.java", "identifier": "DockerContainerDefinitionParserTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_get_uri_from_src_test_or_main_resources_subdirectory() {\n final URI resources =\n DockerContainerDefinitionParser.checkSrcTestAndMainResources(\"simple-docker-compose-v2\", \"resources/myapp\");\n assertThat(resources).isNotNull();\n }", "class_m...
{ "fields": [ { "declarator": "logger = Logger.getLogger(DockerContainerDefinitionParser.class.getName())", "modifier": "private static final", "original_string": "private static final Logger logger = Logger.getLogger(DockerContainerDefinitionParser.class.getName());", "type": "Logger", ...
{ "body": "static URI checkSrcTestAndMainResources(String filename, String outerDirectory) {\n final Path testPath = Paths.get(\"src\", \"test\", outerDirectory, filename);\n final Path testDefinitionPath = resolveDockerDefinition(testPath);\n if (testDefinitionPath != null) {\n return...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_9
{ "fields": [ { "declarator": "istioClient", "modifier": "@Mock\n private", "original_string": "@Mock\n private IstioClient istioClient;", "type": "IstioClient", "var_name": "istioClient" }, { "declarator": "istioResource", "modifier": "@Mock\n private", ...
{ "body": "@Test\n public void should_load_all_routes_from_path() throws IOException {\n\n // given\n final IstioAssistant istioAssistant = new IstioAssistant(istioClient);\n\n // when\n final List<IstioResource> istioResources =\n istioAssistant.deployIstioResources(Paths.ge...
{ "fields": [ { "declarator": "istioClient", "modifier": "private final", "original_string": "private final IstioClient istioClient;", "type": "IstioClient", "var_name": "istioClient" }, { "declarator": "httpClient", "modifier": "private final", "original_st...
{ "body": "public List<IstioResource> deployIstioResources(final InputStream inputStream) {\n return istioClient.registerCustomResources(inputStream);\n }", "class_method_signature": "IstioAssistant.deployIstioResources(final InputStream inputStream)", "constructor": false, "full_signature": "public L...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_23
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" }, { "decl...
{ "body": "@Test\n public void should_move_recording_video() throws IOException, NoSuchMethodException {\n\n final File destination = temporaryFolder.newFolder(\"destination\");\n final File video = temporaryFolder.newFile(\"file.flv\");\n Files.write(video.toPath(), \"Hello\".getBytes());\n\n...
{ "fields": [ { "declarator": "afterVideoRecordedEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<AfterVideoRecorded> afterVideoRecordedEvent;", "type": "Event<AfterVideoRecorded>", "var_name": "afterVideoRecordedEvent" }, { "declarator": "seleniumC...
{ "body": "public void stopRecording(@Observes After afterTestMethod, TestResult testResult,\n CubeDroneConfiguration cubeDroneConfiguration, SeleniumContainers seleniumContainers) {\n\n try {\n if (this.vnc != null) {\n vnc.stop();\n\n Path finalLocation = null;...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_35
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/SinglePortBindResolverTest.java", "identifier": "SinglePortBindResolverTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void should_throw_exception_when_resolve_two_bind_port_from_different_containers_with_same_exposed_port() {\n String content =\n \"tomcat:\\n\" +\n \" image: tutum/tomcat:8.0\\n\" +\n \" portBindi...
{ "fields": [ { "declarator": "NO_PORT = -1", "modifier": "private static final", "original_string": "private static final int NO_PORT = -1;", "type": "int", "var_name": "NO_PORT" } ], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/SinglePortBindRes...
{ "body": "public static int resolveBindPort(CubeDockerConfiguration cubeDockerConfiguration, int exposedPort,\n String... excludedContainers) {\n final PortBindInfo portBinding = resolvePortBindPort(cubeDockerConfiguration, exposedPort, excludedContainers);\n\n if (portBinding == null) {\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_114
{ "fields": [ { "declarator": "restoreSystemProperties = new RestoreSystemProperties()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();", "type": "RestoreSystemProperties", ...
{ "body": "@Test\n public void should_resolve_property_from_config_map() {\n // given\n final EnricherExpressionResolver resolver =\n new EnricherExpressionResolver(ConfigurationParameters.from(\"app.name\", \"myapp\"));\n\n // when\n final String resolvedString = resolver.re...
{ "fields": [ { "declarator": "configurationParameters", "modifier": "private", "original_string": "private ConfigurationParameters configurationParameters;", "type": "ConfigurationParameters", "var_name": "configurationParameters" } ], "file": "core/src/main/java/org/arquill...
{ "body": "public String resolve(String property) {\n final String replacedProperties = StringPropertyReplacer.replaceProperties(property);\n if (!property.equals(replacedProperties)) {\n return replacedProperties;\n } else {\n final Map<String, String> configParams = config...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_62
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "@Mock", "original_string": "@Mock\n CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/test/java/org/arquillian/cube/d...
{ "body": "@Test(expected = UnsatisfiedRequirementException.class)\n public void testDockerMachineRequirementCheckNoMatchingNameNotMatched() throws Exception {\n when(commandLineExecutor.execCommandAsArray(anyVararg())).thenReturn(Arrays.asList(new String[] {\"my-docker-machine\"}));\n\n DockerMachin...
{ "fields": [ { "declarator": "commandLineExecutor", "modifier": "private final", "original_string": "private final CommandLineExecutor commandLineExecutor;", "type": "CommandLineExecutor", "var_name": "commandLineExecutor" } ], "file": "docker/docker/src/main/java/org/arquil...
{ "body": "@Override\n public void check(RequiresDockerMachine context) throws UnsatisfiedRequirementException {\n String name = context.name();\n try {\n if (name != null && !name.isEmpty()) {\n List<String> machines =\n commandLineExecutor.execCommandAsA...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_15
{ "fields": [], "file": "kubernetes/kubernetes/src/test/java/org/arquillian/cube/kubernetes/impl/utils/FileUtilsTest.java", "identifier": "FileUtilsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void should_get_file_extension() {\n final String resource = resourceSuffix(Paths.get(\"foo/bar/hello.yml\"));\n\n Assertions.assertThat(resource).isEqualTo(\".yml\");\n }", "class_method_signature": "FileUtilsTest.should_get_file_extension()", "constructor": false, ...
{ "fields": [], "file": "kubernetes/kubernetes/src/main/java/org/arquillian/cube/kubernetes/impl/utils/FileUtils.java", "identifier": "FileUtils", "interfaces": "", "methods": [ { "class_method_signature": "FileUtils.isResourceAllowed(Path path, String[] resourceNames, String[] resourceSuffixes)", ...
{ "body": "static String resourceSuffix(Path path) {\n final String name = fileName(path);\n\n return name.substring(name.lastIndexOf(\".\"));\n }", "class_method_signature": "FileUtils.resourceSuffix(Path path)", "constructor": false, "full_signature": "static String resourceSuffix(Path path)"...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_42
{ "fields": [], "file": "docker/docker/src/test/java/org/arquillian/cube/docker/impl/util/CommandLineExecutorTest.java", "identifier": "CommandLineExecutorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = ExecutionException.class)\n public void shouldThrowAnIllegalArgumentExceptionWhenCommandNotFound() {\n CommandLineExecutor commandLineExecutor = new CommandLineExecutor();\n commandLineExecutor.execCommand(\"commandNotFound.sh\");\n }", "class_method_signature": "Comm...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/CommandLineExecutor.java", "identifier": "CommandLineExecutor", "interfaces": "", "methods": [ { "class_method_signature": "CommandLineExecutor.execCommand(String... arguments)", "constructor": false, ...
{ "body": "public String execCommand(String... arguments) {\n return execCommandAsArray(arguments).get(0);\n }", "class_method_signature": "CommandLineExecutor.execCommand(String... arguments)", "constructor": false, "full_signature": "public String execCommand(String... arguments)", "identifier": "...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_134
{ "fields": [ { "declarator": "temporaryFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder temporaryFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "temporaryFolder" } ], "file": "co...
{ "body": "@Test\n public void shouldGetCachedResult() throws IOException {\n final File newFolder = temporaryFolder.newFolder();\n // Notice that arq.txt does not exists\n CacheUrlAsset cacheUrlAsset = new CacheUrlAsset(new URL(\"http://arquillian.org/images/arq.txt\"));\n CacheUrlAsse...
{ "fields": [ { "declarator": "TEMP_LOCATION = System.getProperty(\"java.io.tmpdir\")", "modifier": "static", "original_string": "static String TEMP_LOCATION = System.getProperty(\"java.io.tmpdir\");", "type": "String", "var_name": "TEMP_LOCATION" }, { "declarator": "ex...
{ "body": "@Override\n public InputStream openStream() {\n final URL source = this.getSource();\n String fileName = getFileName(source);\n\n File file = new File(TEMP_LOCATION, fileName);\n try {\n if (!file.exists() || !file.isFile() || isExpired(file)) {\n In...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_54
{ "fields": [ { "declarator": "ID = \"test\"", "modifier": "private static final", "original_string": "private static final String ID = \"test\";", "type": "String", "var_name": "ID" }, { "declarator": "executor", "modifier": "@Mock\n private", "original_...
{ "body": "@Test\n public void shouldFireLifecycleEventsDuringCreate() {\n cube.create();\n assertEventFired(BeforeCreate.class, 1);\n assertEventFired(AfterCreate.class, 1);\n }", "class_method_signature": "DockerCubeTest.shouldFireLifecycleEventsDuringCreate()", "constructor": false, ...
{ "fields": [ { "declarator": "log = Logger.getLogger(DockerCube.class.getName())", "modifier": "private static final", "original_string": "private static final Logger log = Logger.getLogger(DockerCube.class.getName());", "type": "Logger", "var_name": "log" }, { "declar...
{ "body": "@Override\n public void create() throws CubeControlException {\n if (state == State.BEFORE_CREATE || state == State.DESTROYED) {\n try {\n lifecycle.fire(new BeforeCreate(id));\n\n log.fine(String.format(\"Creating container with name %s and configuration ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_122
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test\n public void shouldStopWithCubeIdString() {\n controllerInst.get().stop(CUBE_ID);\n assertEventFired(StopCube.class, 1);\n }", "class_method_signature": "ClientCubeControllerTest.shouldStopWithCubeIdString()", "constructor": false, "full_signature": "@Test public void shoul...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void stop(CubeID cubeId) {\n stop(cubeId.get());\n }", "class_method_signature": "ClientCubeController.stop(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void stop(CubeID cubeId)", "identifier": "stop", "invocations": [ "stop", ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_78
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Mock", "original_string": "@Mock\n CubeRegistry cubeRegistry;", "type": "CubeRegistry", "var_name": "cubeRegistry" }, { "declarator": "dockerCube", "modifier": "@Mock", "original_string": "@Mock\...
{ "body": "@Test\n public void should_unset_docker_host_ip() {\n\n // given\n SystemPropertiesCubeSetter systemPropertiesCubeSetter = new SystemPropertiesCubeSetter();\n\n System.setProperty(\"arq.cube.docker.host\", \"192.168.99.100\");\n\n\n // when\n systemPropertiesCubeSetter...
{ "fields": [ { "declarator": "PREFIX = \"arq.cube.docker\"", "modifier": "private static final", "original_string": "private static final String PREFIX = \"arq.cube.docker\";", "type": "String", "var_name": "PREFIX" } ], "file": "docker/docker/src/main/java/org/arquillian/cu...
{ "body": "public void removeDockerHostProperty(@Observes AfterSuite afterSuite) {\n System.clearProperty(String.format(\"%s.host\", PREFIX));\n }", "class_method_signature": "SystemPropertiesCubeSetter.removeDockerHostProperty(@Observes AfterSuite afterSuite)", "constructor": false, "full_signature":...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_97
{ "fields": [ { "declarator": "reportEvent", "modifier": "@Mock", "original_string": "@Mock\n Event<SectionEvent> reportEvent;", "type": "Event<SectionEvent>", "var_name": "reportEvent" }, { "declarator": "reportEventArgumentCaptor", "modifier": "@Captor", ...
{ "body": "@Test\n public void should_create_video_from_root_directory() throws NoSuchMethodException {\n //given\n TakeVncDroneVideo takeVncDroneVideo = new TakeVncDroneVideo();\n takeVncDroneVideo.reportEvent = reportEvent;\n\n final Method method = getMethod(\"should_create_video_fro...
{ "fields": [ { "declarator": "reportEvent", "modifier": "@Inject", "original_string": "@Inject\n Event<SectionEvent> reportEvent;", "type": "Event<SectionEvent>", "var_name": "reportEvent" } ], "file": "docker/reporter/src/main/java/org/arquillian/cube/docker/impl/client/...
{ "body": "public void reportScreencastRecording(@Observes AfterVideoRecorded event, ReporterConfiguration reporterConfiguration) {\n\n Path videoLocation = event.getVideoLocation();\n\n if (videoLocation != null) {\n\n videoLocation = Paths.get(videoLocation.toString().replace(\"flv\", \"mp4...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_5
{ "fields": [ { "declarator": "cubeOpenShiftConfiguration", "modifier": "@Mock\n private", "original_string": "@Mock\n private CubeOpenShiftConfiguration cubeOpenShiftConfiguration;", "type": "CubeOpenShiftConfiguration", "var_name": "cubeOpenShiftConfiguration" }, { ...
{ "body": "@Test\n public void shouldFireLifecycleEventsDuringStop() {\n buildablePodCube.stop();\n assertEventFired(BeforeStop.class, 1);\n assertEventFired(AfterStop.class, 1);\n }", "class_method_signature": "BuildablePodCubeTest.shouldFireLifecycleEventsDuringStop()", "constructor":...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private String id;", "type": "String", "var_name": "id" }, { "declarator": "resource", "modifier": "private", "original_string": "private Pod resource;", "type": "Pod", ...
{ "body": "@Override\n public void stop() throws CubeControlException {\n if (state == State.STOPPED || state == State.PRE_RUNNING || state == State.DESTROYED) {\n return;\n }\n try {\n lifecycle.fire(new BeforeStop(id));\n destroyPod(holder.getPod());\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_39
{ "fields": [ { "declarator": "folder = new TemporaryFolder()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporaryFolder folder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "folder" } ], "file": "docker/docker/src...
{ "body": "@Test\n public void shouldCopyDockerfileFromDefaultJar() throws IOException, ClassNotFoundException {\n\n //Creates a jar file with required content\n JavaArchive jar = ShrinkWrap.create(JavaArchive.class)\n .addClass(TestJarDockerFile.class)\n .addClasses(CubeDockerF...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/DockerFileUtil.java", "identifier": "DockerFileUtil", "interfaces": "", "methods": [ { "class_method_signature": "DockerFileUtil.DockerFileUtil()", "constructor": true, "full_signature": "private D...
{ "body": "public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output)\n throws IOException {\n if (cubeDockerFile == null) {\n throw new IllegalArgumentException(\"No CubeDockerFile annotation is provided\");\n }\n\n String d...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_81
{ "fields": [ { "declarator": "operatingSystemInterface", "modifier": "@Mock\n private static", "original_string": "@Mock\n private static OperatingSystemInterface operatingSystemInterface;", "type": "OperatingSystemInterface", "var_name": "operatingSystemInterface" }, ...
{ "body": "@Test\n public void shouldNotSetTlsVerifyForTcpSchemeOnOSX() {\n CubeDockerConfigurationResolver resolver = new CubeDockerConfigurationResolver(new Top(),\n new DockerMachine(null),\n new Boot2Docker(null),\n mockDefaultDocker(),\n operatingSystemInterf...
{ "fields": [ { "declarator": "UNIX_SOCKET_SCHEME = \"unix\"", "modifier": "private static final", "original_string": "private static final String UNIX_SOCKET_SCHEME = \"unix\";", "type": "String", "var_name": "UNIX_SOCKET_SCHEME" }, { "declarator": "TCP_SCHEME = \"tcp\...
{ "body": "public Map<String, String> resolve(Map<String, String> config) {\n config = resolveSystemEnvironmentVariables(config);\n config = resolveSystemDefaultSetup(config);\n config = resolveDockerInsideDocker(config);\n config = resolveDownloadDockerMachine(config);\n config = r...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_118
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test\n public void shouldCreateWithCubeIdString() {\n controllerInst.get().create(CUBE_ID);\n assertEventFired(CreateCube.class, 1);\n }", "class_method_signature": "ClientCubeControllerTest.shouldCreateWithCubeIdString()", "constructor": false, "full_signature": "@Test public vo...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void create(CubeID cubeId) {\n create(cubeId.get());\n }", "class_method_signature": "ClientCubeController.create(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void create(CubeID cubeId)", "identifier": "create", "invocations": [ "c...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_119
{ "fields": [ { "declarator": "CUBE_ID = \"x\"", "modifier": "private static final", "original_string": "private static final String CUBE_ID = \"x\";", "type": "String", "var_name": "CUBE_ID" }, { "declarator": "MISSING_CUBE_ID = \"y\"", "modifier": "private stati...
{ "body": "@Test\n public void shouldStartWithCubeID() {\n controllerInst.get().start(new CubeID(CUBE_ID));\n assertEventFired(StartCube.class, 1);\n }", "class_method_signature": "ClientCubeControllerTest.shouldStartWithCubeID()", "constructor": false, "full_signature": "@Test public void s...
{ "fields": [ { "declarator": "cubeRegistry", "modifier": "@Inject\n private", "original_string": "@Inject\n private Instance<CubeRegistry> cubeRegistry;", "type": "Instance<CubeRegistry>", "var_name": "cubeRegistry" }, { "declarator": "controlEvent", "modif...
{ "body": "@Override\n public void start(CubeID cubeId) {\n start(cubeId.get());\n }", "class_method_signature": "ClientCubeController.start(CubeID cubeId)", "constructor": false, "full_signature": "@Override public void start(CubeID cubeId)", "identifier": "start", "invocations": [ "start"...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_80
{ "fields": [ { "declarator": "operatingSystemInterface", "modifier": "@Mock\n private static", "original_string": "@Mock\n private static OperatingSystemInterface operatingSystemInterface;", "type": "OperatingSystemInterface", "var_name": "operatingSystemInterface" }, ...
{ "body": "@Test\n public void shouldSkipsInvalidDockerDefault() throws Exception {\n\n CubeDockerConfigurationResolver resolver = new CubeDockerConfigurationResolver(new Top(),\n new DockerMachine(null),\n new Boot2Docker(boot2dockerCommandLineExecutor),\n mockDefaultDocker...
{ "fields": [ { "declarator": "UNIX_SOCKET_SCHEME = \"unix\"", "modifier": "private static final", "original_string": "private static final String UNIX_SOCKET_SCHEME = \"unix\";", "type": "String", "var_name": "UNIX_SOCKET_SCHEME" }, { "declarator": "TCP_SCHEME = \"tcp\...
{ "body": "public Map<String, String> resolve(Map<String, String> config) {\n config = resolveSystemEnvironmentVariables(config);\n config = resolveSystemDefaultSetup(config);\n config = resolveDockerInsideDocker(config);\n config = resolveDownloadDockerMachine(config);\n config = r...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_38
{ "fields": [ { "declarator": "folder = new TemporaryFolder()", "modifier": "@Rule\n public final", "original_string": "@Rule\n public final TemporaryFolder folder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "folder" } ], "file": "docker/docker/src...
{ "body": "@Test\n public void shouldCopyDockerfileFromDefaultLocation() throws IOException {\n File outputDir = folder.newFolder();\n\n DockerFileUtil.copyDockerfileDirectory(TestLocalDockerFile.class,\n TestLocalDockerFile.class.getAnnotation(CubeDockerFile.class), outputDir);\n A...
{ "fields": [], "file": "docker/docker/src/main/java/org/arquillian/cube/docker/impl/util/DockerFileUtil.java", "identifier": "DockerFileUtil", "interfaces": "", "methods": [ { "class_method_signature": "DockerFileUtil.DockerFileUtil()", "constructor": true, "full_signature": "private D...
{ "body": "public static void copyDockerfileDirectory(Class<?> containerObject, CubeDockerFile cubeDockerFile, File output)\n throws IOException {\n if (cubeDockerFile == null) {\n throw new IllegalArgumentException(\"No CubeDockerFile annotation is provided\");\n }\n\n String d...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_4
{ "fields": [ { "declarator": "cubeOpenShiftConfiguration", "modifier": "@Mock\n private", "original_string": "@Mock\n private CubeOpenShiftConfiguration cubeOpenShiftConfiguration;", "type": "CubeOpenShiftConfiguration", "var_name": "cubeOpenShiftConfiguration" }, { ...
{ "body": "@Test\n public void shouldFireLifecycleEventsDuringStart() {\n buildablePodCube.start();\n assertEventFired(BeforeStart.class, 1);\n assertEventFired(AfterStart.class, 1);\n }", "class_method_signature": "BuildablePodCubeTest.shouldFireLifecycleEventsDuringStart()", "construc...
{ "fields": [ { "declarator": "id", "modifier": "private", "original_string": "private String id;", "type": "String", "var_name": "id" }, { "declarator": "resource", "modifier": "private", "original_string": "private Pod resource;", "type": "Pod", ...
{ "body": "@Override\n public void start() throws CubeControlException {\n try {\n lifecycle.fire(new BeforeStart(id));\n holder.setPod(client.createAndWait(holder.getPod()));\n this.state = State.STARTED;\n try {\n portBindings.podStarted();\n ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_79
{ "fields": [ { "declarator": "operatingSystemInterface", "modifier": "@Mock\n private static", "original_string": "@Mock\n private static OperatingSystemInterface operatingSystemInterface;", "type": "OperatingSystemInterface", "var_name": "operatingSystemInterface" }, ...
{ "body": "@Test\n public void shouldDetectsValidDockerDefault() throws Exception {\n\n\n CubeDockerConfigurationResolver resolver = new CubeDockerConfigurationResolver(new Top(),\n new DockerMachine(null),\n new Boot2Docker(null),\n mockDefaultDocker(),\n operati...
{ "fields": [ { "declarator": "UNIX_SOCKET_SCHEME = \"unix\"", "modifier": "private static final", "original_string": "private static final String UNIX_SOCKET_SCHEME = \"unix\";", "type": "String", "var_name": "UNIX_SOCKET_SCHEME" }, { "declarator": "TCP_SCHEME = \"tcp\...
{ "body": "public Map<String, String> resolve(Map<String, String> config) {\n config = resolveSystemEnvironmentVariables(config);\n config = resolveSystemDefaultSetup(config);\n config = resolveDockerInsideDocker(config);\n config = resolveDownloadDockerMachine(config);\n config = r...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }
25573964_96
{ "fields": [ { "declarator": "MULTIPLE_PORT_BINDING_SCENARIO =\n \"helloworld:\\n\" +\n \" image: dockercloud/hello-world\\n\" +\n \" exposedPorts: [8089/tcp]\\n\" +\n \" networkMode: host\\n\" +\n \" portBindings: [8080->80/tcp, 8081->81/tcp]\"", ...
{ "body": "@Test\n public void should_report_log_file() throws IOException {\n final TakeDockerEnvironment takeDockerEnvironment = new TakeDockerEnvironment();\n takeDockerEnvironment.reportEvent = reportEvent;\n\n takeDockerEnvironment.reportContainerLogs(new BeforeStop(CUBE_ID), dockerClient...
{ "fields": [ { "declarator": "log = Logger.getLogger(TakeDockerEnvironment.class.getName())", "modifier": "private static", "original_string": "private static Logger log = Logger.getLogger(TakeDockerEnvironment.class.getName());", "type": "Logger", "var_name": "log" }, { ...
{ "body": "public void reportContainerLogs(@Observes org.arquillian.cube.spi.event.lifecycle.BeforeStop beforeStop, DockerClientExecutor executor, ReporterConfiguration reporterConfiguration) throws IOException {\n final String cubeId = beforeStop.getCubeId();\n if (cubeId != null) {\n final ...
{ "created": null, "fork": null, "fork_count": 86, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 25573964, "size": 4974, "stargazer_count": 107, "stars": null, "updates": null, "url": "https://github.com/arquillian/arquillian-cube" }