id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
158256479_55
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testNotNull() {\n Evaluator evaluator = new Evaluator(STRUCT, notNull(\"z\"));\n Assert.assertFalse(\"null is null\", evaluator.eval(TestHelpers.Row.of(1, 2, null)));\n Assert.assertTrue(\"3 is not null\", evaluator.eval(TestHelpers.Row.of(1, 2, 3)));\n\n\n Evaluator struct...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_22
{ "fields": [ { "declarator": "hiveLocalDir = \"file:/tmp/hive/\" + UUID.randomUUID().toString()", "modifier": "private static final", "original_string": "private static final String hiveLocalDir = \"file:/tmp/hive/\" + UUID.randomUUID().toString();", "type": "String", "var_name": "h...
{ "body": "@Test\n public void testCreateNamespace() throws TException {\n Namespace namespace1 = Namespace.of(\"noLocation\");\n catalog.createNamespace(namespace1, meta);\n Database database1 = metastoreClient.getDatabase(namespace1.toString());\n\n Assert.assertTrue(database1.getParameters().get(\"own...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HiveCatalog.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveCatalog.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "@Override\n public void createNamespace(Namespace namespace, Map<String, String> meta) {\n Preconditions.checkArgument(\n !namespace.isEmpty(),\n \"Cannot create namespace with invalid name: %s\", namespace);\n Preconditions.checkArgument(isValidateNamespace(namespace),\n \"Cann...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_155
{ "fields": [ { "declarator": "TABLES = new HadoopTables()", "modifier": "private static final", "original_string": "private static final HadoopTables TABLES = new HadoopTables();", "type": "HadoopTables", "var_name": "TABLES" }, { "declarator": "SCHEMA = new Schema(\n ...
{ "body": "@Test\n public void testCustomSortOrder() {\n PartitionSpec spec = PartitionSpec.builderFor(SCHEMA)\n .bucket(\"data\", 16)\n .build();\n SortOrder order = SortOrder.builderFor(SCHEMA)\n .asc(\"id\", NULLS_FIRST)\n .build();\n Table table = TABLES.create(SCHEMA, spec, ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HadoopTables.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HadoopTables.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "@Override\n public Table create(Schema schema, PartitionSpec spec, SortOrder order,\n Map<String, String> properties, String location) {\n Preconditions.checkNotNull(schema, \"A table schema is required\");\n\n TableOperations ops = newTableOps(location);\n if (ops.current() ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_75
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testIntegerGt() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA, greaterThan(\"id\", INT_MAX_VALUE)).eval(FILE);\n Assert.assertFalse(\"Should not match: always false\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator(SCHEMA, greaterThan(\"id\", INT_MAX_VAL...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_102
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestFindFiles.java", "identifier": "TestFindFiles", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testCaseSensitivity() {\n table.newAppend()\n .appendFile(FILE_A)\n .appendFile(FILE_B)\n .appendFile(FILE_C)\n .appendFile(FILE_D)\n .commit();\n\n Iterable<DataFile> files = FindFiles.in(table)\n .caseInsensitive()\n .withMetadat...
{ "fields": [ { "declarator": "DATE_FORMAT = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss.SSS\")", "modifier": "private static final", "original_string": "private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss.SSS\");", "type": "DateTime...
{ "body": "public static Builder in(Table table) {\n return new Builder(table);\n }", "class_method_signature": "FindFiles.in(Table table)", "constructor": false, "full_signature": "public static Builder in(Table table)", "identifier": "in", "invocations": [], "modifiers": "public static", "paramete...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_63
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testAllNulls() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA, notNull(\"all_nulls\")).eval(FILE);\n Assert.assertFalse(\"Should not match: no non-null value in all null column\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator(SCHEMA, notNull(\"some_nulls...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_114
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestRemoveSnapshots.java", "identifier": "TestRemoveSnapshots", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testExpireOlderThan() {\n table.newAppend()\n .appendFile(FILE_A)\n .commit();\n\n Snapshot firstSnapshot = table.currentSnapshot();\n\n waitUntilAfter(table.currentSnapshot().timestampMillis());\n\n table.newAppend()\n .appendFile(FILE_B)\n .com...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(RemoveSnapshots.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(RemoveSnapshots.class);", "type": "Logger", "var_name": "LOG" }, { "de...
{ "body": "@Override\n public ExpireSnapshots expireOlderThan(long timestampMillis) {\n LOG.info(\"Expiring snapshots older than: {} ({})\", new Date(timestampMillis), timestampMillis);\n this.expireOlderThan = timestampMillis;\n return this;\n }", "class_method_signature": "RemoveSnapshots.expireOlderTh...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_34
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testIntegerLt() {\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA, lessThan(\"id\", INT_MIN_VALUE - 25)).eval(FILE);\n Assert.assertFalse(\"Should not read: id range below lower bound (5 < 30)\", shouldRead);\n\n shouldRead = new InclusiveMetricsEvaluator(SCHEMA, l...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_143
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testAppendManifestWithSnapshotIdInheritance() throws IOException {\n table.updateProperties()\n .set(TableProperties.SNAPSHOT_ID_INHERITANCE_ENABLED, \"true\")\n .commit();\n\n Assert.assertEquals(\"Last sequence number should be 0\", 0, readMetadata().lastSequenceN...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public AppendFiles appendManifest(ManifestFile manifest) {\n Preconditions.checkArgument(!manifest.hasExistingFiles(), \"Cannot append manifest with existing files\");\n Preconditions.checkArgument(!manifest.hasDeletedFiles(), \"Cannot append manifest with deleted files\");\n Precondi...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_138
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testChangedPartitionSpec() {\n table.newAppend()\n .appendFile(FILE_A)\n .appendFile(FILE_B)\n .commit();\n\n Snapshot snap = table.currentSnapshot();\n long commitId = snap.snapshotId();\n validateSnapshot(null, snap, 1, FILE_A, FILE_B);\n\n TableMe...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public MergeAppend appendFile(DataFile file) {\n add(file);\n return this;\n }", "class_method_signature": "MergeAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override public MergeAppend appendFile(DataFile file)", "identifier": "appendFile", "in...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_180
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDecimalType() {\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n SearchArgument arg = builder.startAnd().equals(\"decimal\", PredicateLeaf.Type.DECIMAL,\n new HiveDecimalWritable(\"20.12\")).end().build();\n\n UnboundPredicate expected = ...
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_18
{ "fields": [], "file": "pig/src/test/java/org/apache/iceberg/pig/SchemaUtilTest.java", "identifier": "SchemaUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLongInBag() throws IOException {\n Schema icebergSchema = new Schema(\n optional(\n 1, \"nested_list\",\n MapType.ofOptional(\n 2, 3,\n StringType.get(),\n ListType.ofRequired(5, LongType.get()))));\n S...
{ "fields": [], "file": "pig/src/main/java/org/apache/iceberg/pig/SchemaUtil.java", "identifier": "SchemaUtil", "interfaces": "", "methods": [ { "class_method_signature": "SchemaUtil.SchemaUtil()", "constructor": true, "full_signature": "private SchemaUtil()", "identifier": "Schem...
{ "body": "public static ResourceSchema convert(Schema icebergSchema) throws IOException {\n ResourceSchema result = new ResourceSchema();\n result.setFields(convertFields(icebergSchema.columns()));\n return result;\n }", "class_method_signature": "SchemaUtil.convert(Schema icebergSchema)", "constructor...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_179
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTimestampType() {\n Literal<Long> timestampLiteral = Literal.of(\"2012-10-02T05:16:17.123456\").to(Types.TimestampType.withoutZone());\n long timestampMicros = timestampLiteral.value();\n Timestamp ts = Timestamp.from(DateTimeUtil.timestampFromMicros(timestampMicros).toIns...
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_59
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testCaseInsensitiveNot() {\n Evaluator evaluator = new Evaluator(STRUCT, not(equal(\"X\", 7)), false);\n Assert.assertFalse(\"not(7 == 7) => false\", evaluator.eval(TestHelpers.Row.of(7)));\n Assert.assertTrue(\"not(8 == 7) => false\", evaluator.eval(TestHelpers.Row.of(8)));\n...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_58
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testNot() {\n Evaluator evaluator = new Evaluator(STRUCT, not(equal(\"x\", 7)));\n Assert.assertFalse(\"not(7 == 7) => false\", evaluator.eval(TestHelpers.Row.of(7)));\n Assert.assertTrue(\"not(8 == 7) => false\", evaluator.eval(TestHelpers.Row.of(8)));\n\n Evaluator struct...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_178
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDateType() {\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n Date gmtDate = new Date(LocalDate.of(2015, 11, 12).atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli());\n SearchArgument arg = builder.startAnd().equals(\"date\", PredicateLeaf.Type....
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_181
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/serde/objectinspector/TestIcebergRecordObjectInspector.java", "identifier": "TestIcebergRecordObjectInspector", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIcebergRecordObjectInspector() {\n Schema schema = new Schema(\n required(1, \"integer_field\", Types.IntegerType.get()),\n required(2, \"struct_field\", Types.StructType.of(\n Types.NestedField.required(3, \"string_field\", Types.StringT...
{ "fields": [ { "declarator": "EMPTY =\n new IcebergRecordObjectInspector(Types.StructType.of(), Collections.emptyList())", "modifier": "private static final", "original_string": "private static final IcebergRecordObjectInspector EMPTY =\n new IcebergRecordObjectInspector(Types...
{ "body": "public IcebergRecordObjectInspector(Types.StructType structType, List<ObjectInspector> objectInspectors) {\n Preconditions.checkArgument(structType.fields().size() == objectInspectors.size());\n\n this.structFields = Lists.newArrayListWithExpectedSize(structType.fields().size());\n\n int position ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_19
{ "fields": [], "file": "hive-metastore/src/test/java/org/apache/iceberg/hive/TestClientPool.java", "identifier": "TestClientPool", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = RuntimeException.class)\n public void testNewClientFailure() throws Exception {\n try (MockClientPool pool = new MockClientPool(2, Exception.class)) {\n pool.run(Object::toString);\n }\n }", "class_method_signature": "TestClientPool.testNewClientFailure()", "constructor": ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ClientPool.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ClientPool.class);", "type": "Logger", "var_name": "LOG" }, { "declarator":...
{ "body": "public <R> R run(Action<R, C, E> action) throws E, InterruptedException {\n C client = get();\n try {\n return action.run(client);\n\n } catch (Exception exc) {\n if (reconnectExc.isInstance(exc)) {\n try {\n client = reconnect(client);\n } catch (Exception ignored...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_139
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testChangedPartitionSpecMergeExisting() {\n table.newAppend()\n .appendFile(FILE_A)\n .commit();\n\n Snapshot snap1 = table.currentSnapshot();\n long id1 = snap1.snapshotId();\n validateSnapshot(null, snap1, 1, FILE_A);\n\n // create a second compatible man...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public MergeAppend appendFile(DataFile file) {\n add(file);\n return this;\n }", "class_method_signature": "MergeAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override public MergeAppend appendFile(DataFile file)", "identifier": "appendFile", "in...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_35
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testIntegerLtEq() {\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA, lessThanOrEqual(\"id\", INT_MIN_VALUE - 25)).eval(FILE);\n Assert.assertFalse(\"Should not read: id range below lower bound (5 < 30)\", shouldRead);\n\n shouldRead = new InclusiveMetricsEvaluator(...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_142
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testRecovery() {\n // merge all manifests for this test\n table.updateProperties().set(\"commit.manifest.min-count-to-merge\", \"1\").commit();\n\n Assert.assertEquals(\"Last sequence number should be 0\", 0, readMetadata().lastSequenceNumber());\n\n table.newAppend()\n ...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public MergeAppend appendFile(DataFile file) {\n add(file);\n return this;\n }", "class_method_signature": "MergeAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override public MergeAppend appendFile(DataFile file)", "identifier": "appendFile", "in...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_62
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testNotIn() {\n Assert.assertEquals(3, notIn(\"s\", 7, 8, 9).literals().size());\n Assert.assertEquals(3, notIn(\"s\", 7, 8.1, Long.MAX_VALUE).literals().size());\n Assert.assertEquals(3, notIn(\"s\", \"abc\", \"abd\", \"abc\").literals().size());\n Assert.assertEquals(0, n...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_115
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestIncrementalDataTableScan.java", "identifier": "TestIncrementalDataTableScan", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testInvalidScans() {\n add(table.newAppend(), files(\"A\"));\n AssertHelpers.assertThrows(\n \"from and to snapshots cannot be the same, since from snapshot is exclusive and not part of the scan\",\n IllegalArgumentException.class, \"from and to snapshot ids cannot ...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/IncrementalDataTableScan.java", "identifier": "IncrementalDataTableScan", "interfaces": "", "methods": [ { "class_method_signature": "IncrementalDataTableScan.IncrementalDataTableScan(TableOperations ops, Table table, Schema schema, Tabl...
{ "body": "@Override\n public TableScan appendsBetween(long newFromSnapshotId, long newToSnapshotId) {\n validateSnapshotIdsRefinement(newFromSnapshotId, newToSnapshotId);\n return new IncrementalDataTableScan(tableOps(), table(), schema(),\n context().fromSnapshotId(newFromSnapshotId).toSnapshotId(newT...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_74
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testIntegerLtEq() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA, lessThanOrEqual(\"id\", INT_MIN_VALUE - 1)).eval(FILE);\n Assert.assertFalse(\"Should not match: always false\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator(SCHEMA, lessThanOrEqual(\"id\...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_103
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestFindFiles.java", "identifier": "TestFindFiles", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testNoSnapshot() {\n // a table has no snapshot when it just gets created and no data is loaded yet\n\n // if not handled properly, NPE will be thrown in collect()\n Iterable<DataFile> files = FindFiles.in(table).collect();\n\n // verify an empty collection of data file is ...
{ "fields": [ { "declarator": "DATE_FORMAT = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss.SSS\")", "modifier": "private static final", "original_string": "private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss.SSS\");", "type": "DateTime...
{ "body": "public static Builder in(Table table) {\n return new Builder(table);\n }", "class_method_signature": "FindFiles.in(Table table)", "constructor": false, "full_signature": "public static Builder in(Table table)", "identifier": "in", "invocations": [], "modifiers": "public static", "paramete...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_23
{ "fields": [ { "declarator": "hiveLocalDir = \"file:/tmp/hive/\" + UUID.randomUUID().toString()", "modifier": "private static final", "original_string": "private static final String hiveLocalDir = \"file:/tmp/hive/\" + UUID.randomUUID().toString();", "type": "String", "var_name": "h...
{ "body": "@Test\n public void testNamespaceExists() throws TException {\n Namespace namespace = Namespace.of(\"dbname_exists\");\n\n catalog.createNamespace(namespace, meta);\n\n Assert.assertTrue(\"Should true to namespace exist\",\n catalog.namespaceExists(namespace));\n Assert.assertTrue(\"Sho...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HiveCatalog.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveCatalog.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "@Override\n public void createNamespace(Namespace namespace, Map<String, String> meta) {\n Preconditions.checkArgument(\n !namespace.isEmpty(),\n \"Cannot create namespace with invalid name: %s\", namespace);\n Preconditions.checkArgument(isValidateNamespace(namespace),\n \"Cann...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_154
{ "fields": [ { "declarator": "TABLES = new HadoopTables()", "modifier": "private static final", "original_string": "private static final HadoopTables TABLES = new HadoopTables();", "type": "HadoopTables", "var_name": "TABLES" }, { "declarator": "SCHEMA = new Schema(\n ...
{ "body": "@Test\n public void testDefaultSortOrder() {\n PartitionSpec spec = PartitionSpec.builderFor(SCHEMA)\n .bucket(\"data\", 16)\n .build();\n Table table = TABLES.create(SCHEMA, spec, tableDir.toURI().toString());\n\n SortOrder sortOrder = table.sortOrder();\n Assert.assertEquals(\"...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HadoopTables.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HadoopTables.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "@Override\n public Table create(Schema schema, PartitionSpec spec, SortOrder order,\n Map<String, String> properties, String location) {\n Preconditions.checkNotNull(schema, \"A table schema is required\");\n\n TableOperations ops = newTableOps(location);\n if (ops.current() ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_123
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", Types.IntegerType.get()),\n optional(2, \"data\", Types.StringType.get()),\n optional(3, \"preferences\", Types.StructType.of(\n required(8, \"feature1\", Types.BooleanType.get()),\n optional(9, \"feat...
{ "body": "@Test\n public void testRequireColumn() {\n Schema schema = new Schema(optional(1, \"id\", Types.IntegerType.get()));\n Schema expected = new Schema(required(1, \"id\", Types.IntegerType.get()));\n\n AssertHelpers.assertThrows(\"Should reject change to required if incompatible changes are not all...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SchemaUpdate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SchemaUpdate.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "@Override\n public UpdateSchema requireColumn(String name) {\n internalUpdateColumnRequirement(name, false);\n return this;\n }", "class_method_signature": "SchemaUpdate.requireColumn(String name)", "constructor": false, "full_signature": "@Override public UpdateSchema requireColumn(String na...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_54
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testIsNull() {\n Evaluator evaluator = new Evaluator(STRUCT, isNull(\"z\"));\n Assert.assertTrue(\"null is null\", evaluator.eval(TestHelpers.Row.of(1, 2, null)));\n Assert.assertFalse(\"3 is not null\", evaluator.eval(TestHelpers.Row.of(1, 2, 3)));\n\n Evaluator structEval...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_174
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testOrOperand() {\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n SearchArgument arg = builder\n .startOr()\n .equals(\"salary\", PredicateLeaf.Type.LONG, 3000L)\n .equals(\"salary\", PredicateLeaf.Type.LONG, 4000L)\n .end().bu...
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_162
{ "fields": [ { "declarator": "meta = ImmutableMap.of()", "modifier": "private static", "original_string": "private static ImmutableMap<String, String> meta = ImmutableMap.of();", "type": "ImmutableMap<String, String>", "var_name": "meta" } ], "file": "core/src/test/java/org/...
{ "body": "@Test\n public void testCreateNamespace() throws Exception {\n Configuration conf = new Configuration();\n String warehousePath = temp.newFolder().getAbsolutePath();\n HadoopCatalog catalog = new HadoopCatalog(conf, warehousePath);\n\n TableIdentifier tbl1 = TableIdentifier.of(\"db\", \"ns1\",...
{ "fields": [ { "declarator": "ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\"", "modifier": "private static final", "original_string": "private static final String ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\";", "type": "String", "var_name": "ICEBERG_HADOOP_WAREHOUSE_...
{ "body": "@Override\n public void createNamespace(Namespace namespace, Map<String, String> meta) {\n Preconditions.checkArgument(\n !namespace.isEmpty(),\n \"Cannot create namespace with invalid name: %s\", namespace);\n if (!meta.isEmpty()) {\n throw new UnsupportedOperationException(\"Can...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_15
{ "fields": [ { "declarator": "INTEGER_FIELD = \"i\"", "modifier": "private static final", "original_string": "private static final String INTEGER_FIELD = \"i\";", "type": "String", "var_name": "INTEGER_FIELD" }, { "declarator": "BOOLEAN_FIELD = \"b\"", "modifier"...
{ "body": "@Test\n public void convertComplex() {\n Schema iceberg = new Schema(\n Types.NestedField.optional(0, \"m\", MapType.ofOptional(\n 1, 2, StringType.get(),\n LongType.get())\n ),\n Types.NestedField.required(3, \"m2\", MapType.ofOptional(\n 4, 5, Str...
{ "fields": [ { "declarator": "ORIGINAL_TYPE = \"originalType\"", "modifier": "private static final", "original_string": "private static final String ORIGINAL_TYPE = \"originalType\";", "type": "String", "var_name": "ORIGINAL_TYPE" }, { "declarator": "MAP_TYPE = \"mapTy...
{ "body": "public static Schema convert(final org.apache.iceberg.Schema schema) {\n ImmutableList.Builder<Field> fields = ImmutableList.builder();\n\n for (NestedField f : schema.columns()) {\n fields.add(convert(f));\n }\n\n return new Schema(fields.build());\n }", "class_method_signature": "Arro...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_135
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testMergeWithExistingManifestAfterDelete() {\n // merge all manifests for this test\n table.updateProperties().set(\"commit.manifest.min-count-to-merge\", \"1\").commit();\n\n Assert.assertEquals(\"Table should start empty\", 0, listManifestFiles().size());\n Assert.assertE...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public MergeAppend appendFile(DataFile file) {\n add(file);\n return this;\n }", "class_method_signature": "MergeAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override public MergeAppend appendFile(DataFile file)", "identifier": "appendFile", "in...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_42
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testCaseSensitiveIntegerNotEqRewritten() {\n AssertHelpers.assertThrows(\"Should complain about missing column in expression\",\n ValidationException.class, \"Cannot find field 'ID'\",\n () -> new InclusiveMetricsEvaluator(SCHEMA, not(equal(\"ID\", 5)), true).eval(FILE...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_0
{ "fields": [], "file": "spark3/src/test/java/org/apache/iceberg/spark/source/TestSparkTable.java", "identifier": "TestSparkTable", "interfaces": "", "superclass": "extends SparkCatalogTestBase" }
{ "body": "@Test\n public void testTableEquality() throws NoSuchTableException {\n CatalogManager catalogManager = spark.sessionState().catalogManager();\n TableCatalog catalog = (TableCatalog) catalogManager.catalog(catalogName);\n Identifier identifier = Identifier.of(tableIdent.namespace().levels(), tabl...
{ "fields": [ { "declarator": "RESERVED_PROPERTIES = Sets.newHashSet(\"provider\", \"format\", \"current-snapshot-id\")", "modifier": "private static final", "original_string": "private static final Set<String> RESERVED_PROPERTIES = Sets.newHashSet(\"provider\", \"format\", \"current-snapshot-id...
{ "body": "@Override\n public String name() {\n return icebergTable.toString();\n }", "class_method_signature": "SparkTable.name()", "constructor": false, "full_signature": "@Override public String name()", "identifier": "name", "invocations": [ "toString" ], "modifiers": "@Override public", ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_39
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testIntegerNotEq() {\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA, notEqual(\"id\", INT_MIN_VALUE - 25)).eval(FILE);\n Assert.assertTrue(\"Should read: id below lower bound\", shouldRead);\n\n shouldRead = new InclusiveMetricsEvaluator(SCHEMA, notEqual(\"id\", I...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_81
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testIntegerNotIn() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA,\n notIn(\"id\", INT_MIN_VALUE - 25, INT_MIN_VALUE - 24)).eval(FILE);\n Assert.assertTrue(\"Should not match: all values !=5 and !=6\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_119
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", Types.IntegerType.get()),\n optional(2, \"data\", Types.StringType.get()),\n optional(3, \"preferences\", Types.StructType.of(\n required(8, \"feature1\", Types.BooleanType.get()),\n optional(9, \"feat...
{ "body": "@Test\n public void testNoChanges() {\n Schema identical = new SchemaUpdate(SCHEMA, SCHEMA_LAST_COLUMN_ID).apply();\n Assert.assertEquals(\"Should not include any changes\", SCHEMA.asStruct(), identical.asStruct());\n }", "class_method_signature": "TestSchemaUpdate.testNoChanges()", "constructo...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SchemaUpdate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SchemaUpdate.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "@Override\n public Schema apply() {\n return applyChanges(schema, deletes, updates, adds, moves);\n }", "class_method_signature": "SchemaUpdate.apply()", "constructor": false, "full_signature": "@Override public Schema apply()", "identifier": "apply", "invocations": [ "applyChanges" ],...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_78
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testIntegerNotEq() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA, notEqual(\"id\", INT_MIN_VALUE - 25)).eval(FILE);\n Assert.assertTrue(\"Should match: no values == 5\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator(SCHEMA, notEqual(\"id\", INT_MIN_VALU...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_97
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestFindFiles.java", "identifier": "TestFindFiles", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testWithRecordsMatching() {\n table.newAppend()\n .appendFile(DataFiles.builder(SPEC)\n .withInputFile(Files.localInput(\"/path/to/data-e.parquet\"))\n .withPartitionPath(\"data_bucket=4\")\n .withMetrics(new Metrics(3L,\n null,...
{ "fields": [ { "declarator": "DATE_FORMAT = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss.SSS\")", "modifier": "private static final", "original_string": "private static final DateTimeFormatter DATE_FORMAT = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss.SSS\");", "type": "DateTime...
{ "body": "public static Builder in(Table table) {\n return new Builder(table);\n }", "class_method_signature": "FindFiles.in(Table table)", "constructor": false, "full_signature": "public static Builder in(Table table)", "identifier": "in", "invocations": [], "modifiers": "public static", "paramete...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_158
{ "fields": [ { "declarator": "meta = ImmutableMap.of()", "modifier": "private static", "original_string": "private static ImmutableMap<String, String> meta = ImmutableMap.of();", "type": "ImmutableMap<String, String>", "var_name": "meta" } ], "file": "core/src/test/java/org/...
{ "body": "@Test\n public void testCreateTableCustomSortOrder() throws Exception {\n Configuration conf = new Configuration();\n String warehousePath = temp.newFolder().getAbsolutePath();\n HadoopCatalog catalog = new HadoopCatalog(conf, warehousePath);\n TableIdentifier tableIdent = TableIdentifier.of(\...
{ "fields": [ { "declarator": "ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\"", "modifier": "private static final", "original_string": "private static final String ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\";", "type": "String", "var_name": "ICEBERG_HADOOP_WAREHOUSE_...
{ "body": "@Override\n public TableBuilder buildTable(TableIdentifier identifier, Schema schema) {\n return new HadoopCatalogTableBuilder(identifier, schema);\n }", "class_method_signature": "HadoopCatalog.buildTable(TableIdentifier identifier, Schema schema)", "constructor": false, "full_signature": "@Ove...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_24
{ "fields": [ { "declarator": "hiveLocalDir = \"file:/tmp/hive/\" + UUID.randomUUID().toString()", "modifier": "private static final", "original_string": "private static final String hiveLocalDir = \"file:/tmp/hive/\" + UUID.randomUUID().toString();", "type": "String", "var_name": "h...
{ "body": "@Test\n public void testDropNamespace() throws TException {\n Namespace namespace = Namespace.of(\"dbname_drop\");\n TableIdentifier identifier = TableIdentifier.of(namespace, \"table\");\n Schema schema = new Schema(Types.StructType.of(\n required(1, \"id\", Types.LongType.get())).fields(...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HiveCatalog.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveCatalog.class);", "type": "Logger", "var_name": "LOG" }, { "declarator...
{ "body": "@Override\n public boolean dropNamespace(Namespace namespace) {\n if (!isValidateNamespace(namespace)) {\n return false;\n }\n\n try {\n clients.run(client -> {\n client.dropDatabase(namespace.level(0),\n false /* deleteData */,\n false /* ignoreUnknownDb */...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_153
{ "fields": [ { "declarator": "TABLES = new HadoopTables()", "modifier": "private static final", "original_string": "private static final HadoopTables TABLES = new HadoopTables();", "type": "HadoopTables", "var_name": "TABLES" }, { "declarator": "SCHEMA = new Schema(\n ...
{ "body": "@Test\n public void testDropTable() {\n TABLES.create(SCHEMA, tableDir.toURI().toString());\n TABLES.dropTable(tableDir.toURI().toString());\n AssertHelpers.assertThrows(\n \"Should complain about missing table\", NoSuchTableException.class,\n \"Table does not exist\", () -> TABLES....
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(HadoopTables.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(HadoopTables.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "public boolean dropTable(String location) {\n return dropTable(location, true);\n }", "class_method_signature": "HadoopTables.dropTable(String location)", "constructor": false, "full_signature": "public boolean dropTable(String location)", "identifier": "dropTable", "invocations": [ "drop...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_73
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testIntegerLt() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA, lessThan(\"id\", INT_MIN_VALUE)).eval(FILE);\n Assert.assertFalse(\"Should not match: always false\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator(SCHEMA, lessThan(\"id\", INT_MIN_VALUE + 1...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_104
{ "fields": [ { "declarator": "TEST_LOCATION = \"s3://bucket/test/location\"", "modifier": "private static final", "original_string": "private static final String TEST_LOCATION = \"s3://bucket/test/location\";", "type": "String", "var_name": "TEST_LOCATION" }, { "declar...
{ "body": "@Test\n public void testJsonWithPreviousMetadataLog() throws Exception {\n long previousSnapshotId = System.currentTimeMillis() - new Random(1234).nextInt(3600);\n Snapshot previousSnapshot = new BaseSnapshot(\n ops.io(), previousSnapshotId, null, previousSnapshotId, null, null, ImmutableList...
{ "fields": [ { "declarator": "INITIAL_SEQUENCE_NUMBER = 0", "modifier": "static final", "original_string": "static final long INITIAL_SEQUENCE_NUMBER = 0;", "type": "long", "var_name": "INITIAL_SEQUENCE_NUMBER" }, { "declarator": "DEFAULT_TABLE_FORMAT_VERSION = 1", ...
{ "body": "public List<MetadataLogEntry> previousFiles() {\n return previousFiles;\n }", "class_method_signature": "TableMetadata.previousFiles()", "constructor": false, "full_signature": "public List<MetadataLogEntry> previousFiles()", "identifier": "previousFiles", "invocations": [], "modifiers": "p...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_65
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testSomeNulls() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA, lessThan(\"some_nulls\", \"ggg\")).eval(FILE_2);\n Assert.assertFalse(\"Should not match: lessThan on some nulls column\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator(SCHEMA, lessThanOrEqu...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_112
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestPartitionSpecParser.java", "identifier": "TestPartitionSpecParser", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testFromJsonWithoutFieldId() {\n String specString = \"{\\n\" +\n \" \\\"spec-id\\\" : 1,\\n\" +\n \" \\\"fields\\\" : [ {\\n\" +\n \" \\\"name\\\" : \\\"id_bucket\\\",\\n\" +\n \" \\\"transform\\\" : \\\"bucket[8]\\\",\\n\" +\n \" \\\"s...
{ "fields": [ { "declarator": "SPEC_ID = \"spec-id\"", "modifier": "private static final", "original_string": "private static final String SPEC_ID = \"spec-id\";", "type": "String", "var_name": "SPEC_ID" }, { "declarator": "FIELDS = \"fields\"", "modifier": "priva...
{ "body": "public static PartitionSpec fromJson(Schema schema, JsonNode json) {\n Preconditions.checkArgument(json.isObject(), \"Cannot parse spec from non-object: %s\", json);\n int specId = JsonUtil.getInt(SPEC_ID, json);\n PartitionSpec.Builder builder = PartitionSpec.builderFor(schema).withSpecId(specId)...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_32
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testAnd() {\n // this test case must use a real predicate, not alwaysTrue(), or binding will simplify it out\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA,\n and(lessThan(\"id\", INT_MIN_VALUE - 25), greaterThanOrEqual(\"id\", INT_MIN_VALUE - 30))).eval(FILE)...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_145
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testAppendManifestFailureWithSnapshotIdInheritance() throws IOException {\n table.updateProperties()\n .set(TableProperties.SNAPSHOT_ID_INHERITANCE_ENABLED, \"true\")\n .commit();\n\n Assert.assertEquals(\"Last sequence number should be 0\", 0, readMetadata().lastSe...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public AppendFiles appendManifest(ManifestFile manifest) {\n Preconditions.checkArgument(!manifest.hasExistingFiles(), \"Cannot append manifest with existing files\");\n Preconditions.checkArgument(!manifest.hasDeletedFiles(), \"Cannot append manifest with deleted files\");\n Precondi...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_49
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testGreaterThanOrEqual() {\n Evaluator evaluator = new Evaluator(STRUCT, greaterThanOrEqual(\"x\", 7));\n Assert.assertTrue(\"7 >= 7 => true\", evaluator.eval(TestHelpers.Row.of(7, 8, null)));\n Assert.assertFalse(\"6 >= 7 => false\", evaluator.eval(TestHelpers.Row.of(6, 8, nu...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_169
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLessThanEqualsOperand() {\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n SearchArgument arg = builder.startAnd().lessThanEquals(\"salary\", PredicateLeaf.Type.LONG, 3000L).end().build();\n\n UnboundPredicate expected = Expressions.lessThanOrEqual(...
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_186
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/serde/objectinspector/TestIcebergTimestampObjectInspector.java", "identifier": "TestIcebergTimestampObjectInspector", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIcebergTimestampObjectInspector() {\n TimestampObjectInspector oi = IcebergTimestampObjectInspector.get(false);\n\n Assert.assertEquals(ObjectInspector.Category.PRIMITIVE, oi.getCategory());\n Assert.assertEquals(PrimitiveObjectInspector.PrimitiveCategory.TIMESTAMP, oi.get...
{ "fields": [ { "declarator": "INSTANCE_WITH_ZONE = new IcebergTimestampObjectInspector() {\n @Override\n LocalDateTime toLocalDateTime(Object o) {\n return ((OffsetDateTime) o).toLocalDateTime();\n }\n }", "modifier": "private static final", "original_string": "private static fin...
{ "body": "private IcebergTimestampObjectInspector() {\n super(TypeInfoFactory.timestampTypeInfo);\n }", "class_method_signature": "IcebergTimestampObjectInspector.IcebergTimestampObjectInspector()", "constructor": true, "full_signature": "private IcebergTimestampObjectInspector()", "identifier": "Iceber...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_190
{ "fields": [ { "declarator": "SCHEMA = new Schema(required(1, \"foo\", Types.StringType.get()))", "modifier": "private static final", "original_string": "private static final Schema SCHEMA = new Schema(required(1, \"foo\", Types.StringType.get()));", "type": "Schema", "var_name": "S...
{ "body": "@Test\n public void testLoadTableFromLocation() throws IOException {\n AssertHelpers.assertThrows(\n \"Should complain about table location not set\", IllegalArgumentException.class,\n \"location not set\", () -> Catalogs.loadTable(conf));\n\n HadoopTables tables = new HadoopTa...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(Catalogs.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(Catalogs.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "HA...
{ "body": "public static Table loadTable(Configuration conf) {\n return loadTable(conf, conf.get(InputFormatConfig.TABLE_IDENTIFIER), conf.get(InputFormatConfig.TABLE_LOCATION));\n }", "class_method_signature": "Catalogs.loadTable(Configuration conf)", "constructor": false, "full_signature": "public static ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_128
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", Types.IntegerType.get()),\n optional(2, \"data\", Types.StringType.get()),\n optional(3, \"preferences\", Types.StructType.of(\n required(8, \"feature1\", Types.BooleanType.get()),\n optional(9, \"feat...
{ "body": "@Test\n public void testUpdateMissingColumn() {\n AssertHelpers.assertThrows(\"Should reject rename missing column\",\n IllegalArgumentException.class, \"missing column: col\", () -> {\n UpdateSchema update = new SchemaUpdate(SCHEMA, SCHEMA_LAST_COLUMN_ID);\n update.updateColum...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SchemaUpdate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SchemaUpdate.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "@Override\n public UpdateSchema updateColumn(String name, Type.PrimitiveType newType) {\n Types.NestedField field = schema.findField(name);\n Preconditions.checkArgument(field != null, \"Cannot update missing column: %s\", name);\n Preconditions.checkArgument(!deletes.contains(field.fieldId()),\n...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_28
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testMissingColumn() {\n AssertHelpers.assertThrows(\"Should complain about missing column in expression\",\n ValidationException.class, \"Cannot find field 'missing'\",\n () -> new InclusiveMetricsEvaluator(SCHEMA, lessThan(\"missing\", 5)).eval(FILE));\n }", "class...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_90
{ "fields": [ { "declarator": "TABLES = new HadoopTables(new Configuration())", "modifier": "private static final", "original_string": "private static final HadoopTables TABLES = new HadoopTables(new Configuration());", "type": "HadoopTables", "var_name": "TABLES" }, { ...
{ "body": "@Test\n public void testNoFilesDeletedWhenNoSnapshotsExpired() throws Exception {\n table.newFastAppend()\n .appendFile(FILE_A)\n .commit();\n\n ExpireSnapshotsActionResult results = Actions.forTable(table).expireSnapshots().execute();\n checkExpirationResults(0L, 0L, 0L, results);\...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ExpireSnapshotsAction.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ExpireSnapshotsAction.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "@Override\n public ExpireSnapshotsActionResult execute() {\n if (streamResults) {\n return deleteFiles(expire().toLocalIterator());\n } else {\n return deleteFiles(expire().collectAsList().iterator());\n }\n }", "class_method_signature": "ExpireSnapshotsAction.execute()", "construc...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_108
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestSortOrderParser.java", "identifier": "TestSortOrderParser", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testUnknownTransforms() {\n String jsonString = \"{\\n\" +\n \" \\\"order-id\\\" : 10,\\n\" +\n \" \\\"fields\\\" : [ {\\n\" +\n \" \\\"transform\\\" : \\\"custom_transform\\\",\\n\" +\n \" \\\"source-id\\\" : 2,\\n\" +\n \" \\\"directio...
{ "fields": [ { "declarator": "ORDER_ID = \"order-id\"", "modifier": "private static final", "original_string": "private static final String ORDER_ID = \"order-id\";", "type": "String", "var_name": "ORDER_ID" }, { "declarator": "FIELDS = \"fields\"", "modifier": "...
{ "body": "public static SortOrder fromJson(Schema schema, String json) {\n try {\n return fromJson(schema, JsonUtil.mapper().readValue(json, JsonNode.class));\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n }", "class_method_signature": "SortOrderParser.fromJson(Schema sc...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_69
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testZeroRecordFile() {\n DataFile empty = new TestDataFile(\"file.parquet\", Row.of(), 0);\n\n Expression[] exprs = new Expression[] {\n lessThan(\"id\", 5), lessThanOrEqual(\"id\", 30), equal(\"id\", 70), greaterThan(\"id\", 78),\n greaterThanOrEqual(\"id\", 90), n...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_86
{ "fields": [], "file": "api/src/test/java/org/apache/iceberg/types/TestTypeUtil.java", "identifier": "TestTypeUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = IllegalArgumentException.class)\n public void testReassignIdsIllegalArgumentException() {\n Schema schema = new Schema(\n required(1, \"a\", Types.IntegerType.get()),\n required(2, \"b\", Types.IntegerType.get())\n );\n Schema sourceSchema = new Schema(\n req...
{ "fields": [ { "declarator": "MAX_PRECISION = new int[24]", "modifier": "private static final", "original_string": "private static final int[] MAX_PRECISION = new int[24];", "type": "int[]", "var_name": "MAX_PRECISION" }, { "declarator": "REQUIRED_LENGTH = new int[40]"...
{ "body": "public static Schema reassignIds(Schema schema, Schema idSourceSchema) {\n Types.StructType struct = visit(schema, new ReassignIds(idSourceSchema)).asStructType();\n return new Schema(struct.fields());\n }", "class_method_signature": "TypeUtil.reassignIds(Schema schema, Schema idSourceSchema)", ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_149
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testIncludedPartitionSummaries() {\n table.updateProperties()\n .set(TableProperties.WRITE_PARTITION_SUMMARY_LIMIT, \"1\")\n .commit();\n\n table.newFastAppend()\n .appendFile(FILE_A)\n .commit();\n\n Set<String> partitionSummaryKeys = table.current...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public MergeAppend appendFile(DataFile file) {\n add(file);\n return this;\n }", "class_method_signature": "MergeAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override public MergeAppend appendFile(DataFile file)", "identifier": "appendFile", "in...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_7
{ "fields": [], "file": "orc/src/test/java/org/apache/iceberg/orc/TestExpressionToSearchArgument.java", "identifier": "TestExpressionToSearchArgument", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEvolvedSchema() {\n Schema fileSchema = new Schema(\n required(1, \"int\", Types.IntegerType.get()),\n optional(2, \"long_to_be_dropped\", Types.LongType.get())\n );\n\n Schema evolvedSchema = new Schema(\n required(1, \"int_renamed\", Types.IntegerTyp...
{ "fields": [ { "declarator": "UNSUPPORTED_TYPES = ImmutableSet.of(\n TypeID.TIMESTAMP, // Temporarily disable filters on Timestamp columns due to ORC-611\n TypeID.BINARY,\n TypeID.FIXED,\n TypeID.UUID,\n TypeID.STRUCT,\n TypeID.MAP,\n TypeID.LIST\n )", "modifier": ...
{ "body": "static SearchArgument convert(Expression expr, TypeDescription readSchema) {\n Map<Integer, String> idToColumnName = ORCSchemaUtil.idToOrcName(ORCSchemaUtil.convert(readSchema));\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n ExpressionVisitors.visit(expr, new ExpressionT...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_132
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testMergeWithExistingManifest() {\n // merge all manifests for this test\n table.updateProperties().set(\"commit.manifest.min-count-to-merge\", \"1\").commit();\n Assert.assertEquals(\"Last sequence number should be 0\", 0, readMetadata().lastSequenceNumber());\n Assert.ass...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public MergeAppend appendFile(DataFile file) {\n add(file);\n return this;\n }", "class_method_signature": "MergeAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override public MergeAppend appendFile(DataFile file)", "identifier": "appendFile", "in...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_45
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testIntegerNotIn() {\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA,\n notIn(\"id\", INT_MIN_VALUE - 25, INT_MIN_VALUE - 24)).eval(FILE);\n Assert.assertTrue(\"Should read: id below lower bound (5 < 30, 6 < 30)\", shouldRead);\n\n shouldRead = new Inclusive...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_165
{ "fields": [ { "declarator": "meta = ImmutableMap.of()", "modifier": "private static", "original_string": "private static ImmutableMap<String, String> meta = ImmutableMap.of();", "type": "ImmutableMap<String, String>", "var_name": "meta" } ], "file": "core/src/test/java/org/...
{ "body": "@Test\n public void testDropNamespace() throws IOException {\n Configuration conf = new Configuration();\n String warehousePath = temp.newFolder().getAbsolutePath();\n HadoopCatalog catalog = new HadoopCatalog(conf, warehousePath);\n Namespace namespace1 = Namespace.of(\"db\");\n Namespace ...
{ "fields": [ { "declarator": "ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\"", "modifier": "private static final", "original_string": "private static final String ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\";", "type": "String", "var_name": "ICEBERG_HADOOP_WAREHOUSE_...
{ "body": "@Override\n public boolean dropNamespace(Namespace namespace) {\n Path nsPath = new Path(warehouseLocation, SLASH.join(namespace.levels()));\n\n if (!isNamespace(nsPath) || namespace.isEmpty()) {\n return false;\n }\n\n try {\n if (fs.listStatusIterator(nsPath).hasNext()) {\n ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_12
{ "fields": [ { "declarator": "SUPPORTED_PRIMITIVES = Types.StructType.of(\n optional(1, \"intCol\", Types.IntegerType.get()),\n optional(3, \"longCol\", Types.LongType.get()),\n optional(6, \"intCol2\", Types.IntegerType.get()),\n optional(20, \"intCol3\", Types.IntegerType.get()),\n ...
{ "body": "@Test\n public void testHasIds() {\n Schema schema = new Schema(\n optional(1, \"data\", Types.StructType.of(\n optional(10, \"entries\", Types.MapType.ofOptional(11, 12, Types.StringType.get(), Types.DateType.get()))\n )),\n optional(2, \"intCol\", Types.IntegerType.get...
{ "fields": [ { "declarator": "ICEBERG_ID_ATTRIBUTE = \"iceberg.id\"", "modifier": "static final", "original_string": "static final String ICEBERG_ID_ATTRIBUTE = \"iceberg.id\";", "type": "String", "var_name": "ICEBERG_ID_ATTRIBUTE" }, { "declarator": "ICEBERG_REQUIRED_...
{ "body": "static boolean hasIds(TypeDescription orcSchema) {\n return OrcSchemaVisitor.visit(orcSchema, new HasIds());\n }", "class_method_signature": "ORCSchemaUtil.hasIds(TypeDescription orcSchema)", "constructor": false, "full_signature": "static boolean hasIds(TypeDescription orcSchema)", "identifier...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_173
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAndOperand() {\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n SearchArgument arg = builder\n .startAnd()\n .equals(\"salary\", PredicateLeaf.Type.LONG, 3000L)\n .equals(\"salary\", PredicateLeaf.Type.LONG, 4000L)\n .end()....
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_124
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", Types.IntegerType.get()),\n optional(2, \"data\", Types.StringType.get()),\n optional(3, \"preferences\", Types.StructType.of(\n required(8, \"feature1\", Types.BooleanType.get()),\n optional(9, \"feat...
{ "body": "@Test\n public void testAmbiguousAdd() {\n // preferences.booleans could be top-level or a field of preferences\n AssertHelpers.assertThrows(\"Should reject ambiguous column name\",\n IllegalArgumentException.class, \"ambiguous name: preferences.booleans\", () -> {\n UpdateSchema upd...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SchemaUpdate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SchemaUpdate.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "@Override\n public UpdateSchema addColumn(String name, Type type, String doc) {\n Preconditions.checkArgument(!name.contains(\".\"),\n \"Cannot add column with ambiguous name: %s, use addColumn(parent, name, type)\", name);\n return addColumn(null, name, type, doc);\n }", "class_method_sig...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_53
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testAlwaysFalse() {\n Evaluator evaluator = new Evaluator(STRUCT, alwaysFalse());\n Assert.assertFalse(\"always false\", evaluator.eval(TestHelpers.Row.of()));\n }", "class_method_signature": "TestEvaluator.testAlwaysFalse()", "constructor": false, "full_signature": "@Test...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_125
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", Types.IntegerType.get()),\n optional(2, \"data\", Types.StringType.get()),\n optional(3, \"preferences\", Types.StructType.of(\n required(8, \"feature1\", Types.BooleanType.get()),\n optional(9, \"feat...
{ "body": "@Test\n public void testAddAlreadyExists() {\n AssertHelpers.assertThrows(\"Should reject column name that already exists\",\n IllegalArgumentException.class, \"already exists: preferences.feature1\", () -> {\n UpdateSchema update = new SchemaUpdate(SCHEMA, SCHEMA_LAST_COLUMN_ID);\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(SchemaUpdate.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(SchemaUpdate.class);", "type": "Logger", "var_name": "LOG" }, { "declarat...
{ "body": "@Override\n public UpdateSchema addColumn(String name, Type type, String doc) {\n Preconditions.checkArgument(!name.contains(\".\"),\n \"Cannot add column with ambiguous name: %s, use addColumn(parent, name, type)\", name);\n return addColumn(null, name, type, doc);\n }", "class_method_sig...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_52
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testAlwaysTrue() {\n Evaluator evaluator = new Evaluator(STRUCT, alwaysTrue());\n Assert.assertTrue(\"always true\", evaluator.eval(TestHelpers.Row.of()));\n }", "class_method_signature": "TestEvaluator.testAlwaysTrue()", "constructor": false, "full_signature": "@Test publ...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_172
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIsNullOperand() {\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n SearchArgument arg = builder.startAnd().isNull(\"salary\", PredicateLeaf.Type.LONG).end().build();\n\n UnboundPredicate expected = Expressions.isNull(\"salary\");\n UnboundPredica...
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_164
{ "fields": [ { "declarator": "meta = ImmutableMap.of()", "modifier": "private static", "original_string": "private static ImmutableMap<String, String> meta = ImmutableMap.of();", "type": "ImmutableMap<String, String>", "var_name": "meta" } ], "file": "core/src/test/java/org/...
{ "body": "@Test\n public void testAlterNamespaceMeta() throws IOException {\n Configuration conf = new Configuration();\n String warehousePath = temp.newFolder().getAbsolutePath();\n HadoopCatalog catalog = new HadoopCatalog(conf, warehousePath);\n AssertHelpers.assertThrows(\"Should fail to change name...
{ "fields": [ { "declarator": "ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\"", "modifier": "private static final", "original_string": "private static final String ICEBERG_HADOOP_WAREHOUSE_BASE = \"iceberg/warehouse\";", "type": "String", "var_name": "ICEBERG_HADOOP_WAREHOUSE_...
{ "body": "@Override\n public boolean setProperties(Namespace namespace, Map<String, String> properties) {\n throw new UnsupportedOperationException(\n \"Cannot set namespace properties \" + namespace + \" : setProperties is not supported\");\n }", "class_method_signature": "HadoopCatalog.setProperties...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_13
{ "fields": [ { "declarator": "SUPPORTED_PRIMITIVES = Types.StructType.of(\n required(100, \"id\", Types.LongType.get()),\n optional(101, \"data\", Types.StringType.get()),\n required(102, \"b\", Types.BooleanType.get()),\n optional(103, \"i\", Types.IntegerType.get()),\n required(1...
{ "body": "@Test\n public void testSchemaConversionWithoutAssigningIds() {\n MessageType messageType = new MessageType(\"test\",\n primitive(1, \"int_col\", PrimitiveTypeName.INT32, Repetition.REQUIRED),\n primitive(2, \"double_col\", PrimitiveTypeName.DOUBLE, Repetition.OPTIONAL),\n primitiv...
{ "fields": [], "file": "parquet/src/main/java/org/apache/iceberg/parquet/ParquetSchemaUtil.java", "identifier": "ParquetSchemaUtil", "interfaces": "", "methods": [ { "class_method_signature": "ParquetSchemaUtil.ParquetSchemaUtil()", "constructor": true, "full_signature": "private Parqu...
{ "body": "public static Schema convertAndPrune(MessageType parquetSchema) {\n return convertInternal(parquetSchema, name -> null);\n }", "class_method_signature": "ParquetSchemaUtil.convertAndPrune(MessageType parquetSchema)", "constructor": false, "full_signature": "public static Schema convertAndPrune(Me...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_133
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testManifestMergeMinCount() throws IOException {\n Assert.assertEquals(\"Table should start empty\", 0, listManifestFiles().size());\n table.updateProperties().set(TableProperties.MANIFEST_MIN_MERGE_COUNT, \"2\")\n // each manifest file is 5227 bytes, so 12000 bytes limit ...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public AppendFiles appendManifest(ManifestFile manifest) {\n Preconditions.checkArgument(!manifest.hasExistingFiles(), \"Cannot append manifest with existing files\");\n Preconditions.checkArgument(!manifest.hasDeletedFiles(), \"Cannot append manifest with deleted files\");\n Precondi...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_44
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testIntegerIn() {\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA,\n in(\"id\", INT_MIN_VALUE - 25, INT_MIN_VALUE - 24)).eval(FILE);\n Assert.assertFalse(\"Should not read: id below lower bound (5 < 30, 6 < 30)\", shouldRead);\n\n shouldRead = new InclusiveM...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_6
{ "fields": [ { "declarator": "tempFolder = new TemporaryFolder()", "modifier": "@Rule\n public", "original_string": "@Rule\n public TemporaryFolder tempFolder = new TemporaryFolder();", "type": "TemporaryFolder", "var_name": "tempFolder" }, { "declarator": "tablePath...
{ "body": "@Test\n public void testTableWithoutSnapshot() throws Exception {\n try (OneInputStreamOperatorTestHarness<RowData, DataFile> testHarness = createIcebergStreamWriter()) {\n Assert.assertEquals(0, testHarness.extractOutputValues().size());\n }\n // Even if we closed the iceberg stream writer,...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "fullTableName", "modifier": "privat...
{ "body": "@Override\n public void processElement(StreamRecord<T> element) throws Exception {\n writer.write(element.getValue());\n }", "class_method_signature": "IcebergStreamWriter.processElement(StreamRecord<T> element)", "constructor": false, "full_signature": "@Override public void processElement(Stre...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_148
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testDefaultPartitionSummaries() {\n table.newFastAppend()\n .appendFile(FILE_A)\n .commit();\n\n Set<String> partitionSummaryKeys = table.currentSnapshot().summary().keySet().stream()\n .filter(key -> key.startsWith(SnapshotSummary.CHANGED_PARTITION_PREFIX))\...
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public MergeAppend appendFile(DataFile file) {\n add(file);\n return this;\n }", "class_method_signature": "MergeAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override public MergeAppend appendFile(DataFile file)", "identifier": "appendFile", "in...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_68
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testMissingStats() {\n DataFile missingStats = new TestDataFile(\"file.parquet\", Row.of(), 50);\n\n Expression[] exprs = new Expression[] {\n lessThan(\"no_stats\", 5), lessThanOrEqual(\"no_stats\", 30), equal(\"no_stats\", 70),\n greaterThan(\"no_stats\", 78), gre...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_87
{ "fields": [], "file": "api/src/test/java/org/apache/iceberg/types/TestTypeUtil.java", "identifier": "TestTypeUtil", "interfaces": "", "superclass": "" }
{ "body": "@Test(expected = RuntimeException.class)\n public void testValidateSchemaViaIndexByName() {\n Types.NestedField nestedType = Types.NestedField\n .required(1, \"a\", Types.StructType.of(\n required(2, \"b\", Types.StructType.of(\n required(3, \"c\", Types.BooleanType.get...
{ "fields": [ { "declarator": "MAX_PRECISION = new int[24]", "modifier": "private static final", "original_string": "private static final int[] MAX_PRECISION = new int[24];", "type": "int[]", "var_name": "MAX_PRECISION" }, { "declarator": "REQUIRED_LENGTH = new int[40]"...
{ "body": "public static Map<String, Integer> indexByName(Types.StructType struct) {\n IndexByName indexer = new IndexByName();\n visit(struct, indexer);\n return indexer.byName();\n }", "class_method_signature": "TypeUtil.indexByName(Types.StructType struct)", "constructor": false, "full_signature": ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_91
{ "fields": [ { "declarator": "TABLES = new HadoopTables(new Configuration())", "modifier": "private static final", "original_string": "private static final HadoopTables TABLES = new HadoopTables(new Configuration());", "type": "HadoopTables", "var_name": "TABLES" }, { ...
{ "body": "@Test\n public void testExpireOlderThan() {\n table.newAppend()\n .appendFile(FILE_A)\n .commit();\n\n Snapshot firstSnapshot = table.currentSnapshot();\n\n rightAfterSnapshot();\n\n table.newAppend()\n .appendFile(FILE_B)\n .commit();\n\n long snapshotId = table...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(ExpireSnapshotsAction.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(ExpireSnapshotsAction.class);", "type": "Logger", "var_name": "LOG" }, ...
{ "body": "public ExpireSnapshotsAction expireOlderThan(long timestampMillis) {\n this.expireOlderThanValue = timestampMillis;\n return this;\n }", "class_method_signature": "ExpireSnapshotsAction.expireOlderThan(long timestampMillis)", "constructor": false, "full_signature": "public ExpireSnapshotsActio...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_109
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestFastAppend.java", "identifier": "TestFastAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testEmptyTableAppend() {\n Assert.assertEquals(\"Table should start empty\", 0, listManifestFiles().size());\n\n TableMetadata base = readMetadata();\n Assert.assertNull(\"Should not have a current snapshot\", base.currentSnapshot());\n Assert.assertEquals(\"Table should st...
{ "fields": [ { "declarator": "tableName", "modifier": "private final", "original_string": "private final String tableName;", "type": "String", "var_name": "tableName" }, { "declarator": "ops", "modifier": "private final", "original_string": "private final T...
{ "body": "@Override\n public FastAppend appendFile(DataFile file) {\n this.hasNewFiles = true;\n newFiles.add(file);\n summaryBuilder.addedFile(spec, file);\n return this;\n }", "class_method_signature": "FastAppend.appendFile(DataFile file)", "constructor": false, "full_signature": "@Override pu...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_29
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testMissingStats() {\n DataFile missingStats = new TestDataFile(\"file.parquet\", Row.of(), 50);\n\n Expression[] exprs = new Expression[] {\n lessThan(\"no_stats\", 5), lessThanOrEqual(\"no_stats\", 30), equal(\"no_stats\", 70),\n greaterThan(\"no_stats\", 78), gre...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_129
{ "fields": [ { "declarator": "FILE_A_POS_1 = FileMetadata.deleteFileBuilder(SPEC)\n .ofPositionDeletes()\n .withPath(\"/path/to/data-a-pos-deletes.parquet\")\n .withFileSizeInBytes(10)\n .withPartition(FILE_A.partition())\n .withRecordCount(1)\n .build()", "modifier": "s...
{ "body": "@Test\n public void testUnpartitionedDeletes() {\n DeleteFileIndex index = new DeleteFileIndex(\n ImmutableMap.of(\n PartitionSpec.unpartitioned().specId(), PartitionSpec.unpartitioned(),\n 1, SPEC),\n new long[] { 3, 5, 5, 6 }, DELETE_FILES, ImmutableMap.of());\n\n ...
{ "fields": [ { "declarator": "specsById", "modifier": "private final", "original_string": "private final Map<Integer, PartitionSpec> specsById;", "type": "Map<Integer, PartitionSpec>", "var_name": "specsById" }, { "declarator": "partitionTypeById", "modifier": "p...
{ "body": "DeleteFile[] forDataFile(long sequenceNumber, DataFile file) {\n Pair<Integer, StructLikeWrapper> partition = partition(file.specId(), file.partition());\n Pair<long[], DeleteFile[]> partitionDeletes = sortedDeletesByPartition.get(partition);\n\n Stream<DeleteFile> matchingDeletes;\n if (partit...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_191
{ "fields": [ { "declarator": "SCHEMA = new Schema(required(1, \"foo\", Types.StringType.get()))", "modifier": "private static final", "original_string": "private static final Schema SCHEMA = new Schema(required(1, \"foo\", Types.StringType.get()));", "type": "Schema", "var_name": "S...
{ "body": "@Test\n public void testLoadCatalog() throws IOException {\n Assert.assertFalse(Catalogs.loadCatalog(conf).isPresent());\n\n conf.set(InputFormatConfig.CATALOG, \"foo\");\n AssertHelpers.assertThrows(\n \"Should complain about catalog not supported\", NoSuchNamespaceException.class,\n ...
{ "fields": [ { "declarator": "LOG = LoggerFactory.getLogger(Catalogs.class)", "modifier": "private static final", "original_string": "private static final Logger LOG = LoggerFactory.getLogger(Catalogs.class);", "type": "Logger", "var_name": "LOG" }, { "declarator": "HA...
{ "body": "@VisibleForTesting\n static Optional<Catalog> loadCatalog(Configuration conf) {\n String catalogLoaderClass = conf.get(InputFormatConfig.CATALOG_LOADER_CLASS);\n\n if (catalogLoaderClass != null) {\n CatalogLoader loader = (CatalogLoader) DynConstructors.builder(CatalogLoader.class)\n ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_168
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergFilterFactory.java", "identifier": "TestHiveIcebergFilterFactory", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testLessThanOperand() {\n SearchArgument.Builder builder = SearchArgumentFactory.newBuilder();\n SearchArgument arg = builder.startAnd().lessThan(\"salary\", PredicateLeaf.Type.LONG, 3000L).end().build();\n\n UnboundPredicate expected = Expressions.lessThan(\"salary\", 3000L);...
{ "fields": [ { "declarator": "LITERAL_FIELD = DynFields.builder()\n .hiddenImpl(SearchArgumentImpl.PredicateLeafImpl.class, \"literal\")\n .build()", "modifier": "private static final", "original_string": "private static final DynFields.UnboundField<?> LITERAL_FIELD = DynFields.builde...
{ "body": "public static Expression generateFilterExpression(SearchArgument sarg) {\n return translate(sarg.getExpression(), sarg.getLeaves());\n }", "class_method_signature": "HiveIcebergFilterFactory.generateFilterExpression(SearchArgument sarg)", "constructor": false, "full_signature": "public static Exp...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_187
{ "fields": [], "file": "mr/src/test/java/org/apache/iceberg/mr/hive/serde/objectinspector/TestIcebergDateObjectInspector.java", "identifier": "TestIcebergDateObjectInspector", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testIcebergDateObjectInspector() {\n DateObjectInspector oi = IcebergDateObjectInspector.get();\n\n Assert.assertEquals(ObjectInspector.Category.PRIMITIVE, oi.getCategory());\n Assert.assertEquals(PrimitiveObjectInspector.PrimitiveCategory.DATE, oi.getPrimitiveCategory());\n\n...
{ "fields": [ { "declarator": "INSTANCE = new IcebergDateObjectInspector()", "modifier": "private static final", "original_string": "private static final IcebergDateObjectInspector INSTANCE = new IcebergDateObjectInspector();", "type": "IcebergDateObjectInspector", "var_name": "INSTA...
{ "body": "private IcebergDateObjectInspector() {\n super(TypeInfoFactory.dateTypeInfo);\n }", "class_method_signature": "IcebergDateObjectInspector.IcebergDateObjectInspector()", "constructor": true, "full_signature": "private IcebergDateObjectInspector()", "identifier": "IcebergDateObjectInspector", ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_48
{ "fields": [ { "declarator": "STRUCT = StructType.of(\n required(13, \"x\", Types.IntegerType.get()),\n required(14, \"y\", Types.DoubleType.get()),\n optional(15, \"z\", Types.IntegerType.get()),\n optional(16, \"s1\", Types.StructType.of(\n Types.NestedField.required(17, \"s2...
{ "body": "@Test\n public void testGreaterThan() {\n Evaluator evaluator = new Evaluator(STRUCT, greaterThan(\"x\", 7));\n Assert.assertFalse(\"7 > 7 => false\", evaluator.eval(TestHelpers.Row.of(7, 8, null)));\n Assert.assertFalse(\"6 > 7 => false\", evaluator.eval(TestHelpers.Row.of(6, 8, null)));\n As...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" } ], "file": "api/src/main/java/org/apache/iceberg/expressions/Evaluator.java", "identifier": "Evaluator", "int...
{ "body": "public boolean eval(StructLike data) {\n return new EvalVisitor().eval(data);\n }", "class_method_signature": "Evaluator.eval(StructLike data)", "constructor": false, "full_signature": "public boolean eval(StructLike data)", "identifier": "eval", "invocations": [ "eval" ], "modifiers"...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_33
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testOr() {\n // this test case must use a real predicate, not alwaysTrue(), or binding will simplify it out\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA,\n or(lessThan(\"id\", INT_MIN_VALUE - 25), greaterThanOrEqual(\"id\", INT_MAX_VALUE + 1))).eval(FILE);\n...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_144
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/TestMergeAppend.java", "identifier": "TestMergeAppend", "interfaces": "", "superclass": "extends TableTestBase" }
{ "body": "@Test\n public void testMergedAppendManifestCleanupWithSnapshotIdInheritance() throws IOException {\n table.updateProperties()\n .set(TableProperties.SNAPSHOT_ID_INHERITANCE_ENABLED, \"true\")\n .commit();\n\n Assert.assertEquals(\"Last sequence number should be 0\", 0, readMetadata()....
{ "fields": [], "file": "core/src/main/java/org/apache/iceberg/MergeAppend.java", "identifier": "MergeAppend", "interfaces": "implements AppendFiles", "methods": [ { "class_method_signature": "MergeAppend.MergeAppend(String tableName, TableOperations ops)", "constructor": true, "full_sig...
{ "body": "@Override\n public AppendFiles appendManifest(ManifestFile manifest) {\n Preconditions.checkArgument(!manifest.hasExistingFiles(), \"Cannot append manifest with existing files\");\n Preconditions.checkArgument(!manifest.hasDeletedFiles(), \"Cannot append manifest with deleted files\");\n Precondi...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_64
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testNoNulls() {\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA, isNull(\"all_nulls\")).eval(FILE);\n Assert.assertTrue(\"Should match: all values are null\", shouldRead);\n\n shouldRead = new StrictMetricsEvaluator(SCHEMA, isNull(\"some_nulls\")).eval(FILE);\n Ass...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_72
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", IntegerType.get()),\n required(3, \"required\", StringType.get()),\n optional(4, \"all_nulls\", StringType.get()),\n optional(5, \"some_nulls\", StringType.get()...
{ "body": "@Test\n public void testOr() {\n // this test case must use a real predicate, not alwaysTrue(), or binding will simplify it out\n boolean shouldRead = new StrictMetricsEvaluator(SCHEMA,\n or(lessThan(\"id\", INT_MIN_VALUE - 25), greaterThanOrEqual(\"id\", INT_MAX_VALUE + 1))).eval(FILE);\n ...
{ "fields": [ { "declarator": "schema", "modifier": "private final", "original_string": "private final Schema schema;", "type": "Schema", "var_name": "schema" }, { "declarator": "struct", "modifier": "private final", "original_string": "private final StructT...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "StrictMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "full...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_105
{ "fields": [ { "declarator": "TEST_LOCATION = \"s3://bucket/test/location\"", "modifier": "private static final", "original_string": "private static final String TEST_LOCATION = \"s3://bucket/test/location\";", "type": "String", "var_name": "TEST_LOCATION" }, { "declar...
{ "body": "@Test\n public void testParserVersionValidation() throws Exception {\n String supportedVersion = toJsonWithVersion(\n TableMetadata.newTableMetadata(TEST_SCHEMA, SPEC_5, TEST_LOCATION, ImmutableMap.of()),\n TableMetadata.SUPPORTED_TABLE_FORMAT_VERSION);\n TableMetadata parsed = TableMe...
{ "fields": [ { "declarator": "INITIAL_SEQUENCE_NUMBER = 0", "modifier": "static final", "original_string": "static final long INITIAL_SEQUENCE_NUMBER = 0;", "type": "long", "var_name": "INITIAL_SEQUENCE_NUMBER" }, { "declarator": "DEFAULT_TABLE_FORMAT_VERSION = 1", ...
{ "body": "@Deprecated\n public static TableMetadata newTableMetadata(TableOperations ops,\n Schema schema,\n PartitionSpec spec,\n String location,\n ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_25
{ "fields": [ { "declarator": "SCHEMA = new Schema(\n required(1, \"id\", IntegerType.get()),\n optional(2, \"no_stats\", Types.IntegerType.get()),\n required(3, \"required\", Types.StringType.get()),\n optional(4, \"all_nulls\", Types.StringType.get()),\n optional(5, \"some_nulls\"...
{ "body": "@Test\n public void testAllNulls() {\n boolean shouldRead = new InclusiveMetricsEvaluator(SCHEMA, notNull(\"all_nulls\")).eval(FILE);\n Assert.assertFalse(\"Should skip: no non-null value in all null column\", shouldRead);\n\n shouldRead = new InclusiveMetricsEvaluator(SCHEMA, lessThan(\"all_null...
{ "fields": [ { "declarator": "expr", "modifier": "private final", "original_string": "private final Expression expr;", "type": "Expression", "var_name": "expr" }, { "declarator": "ROWS_MIGHT_MATCH = true", "modifier": "private static final", "original_strin...
{ "body": "public boolean eval(ContentFile<?> file) {\n // TODO: detect the case where a column is missing from the file using file's max field id.\n return new MetricsEvalVisitor().eval(file);\n }", "class_method_signature": "InclusiveMetricsEvaluator.eval(ContentFile<?> file)", "constructor": false, "f...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
158256479_152
{ "fields": [], "file": "core/src/test/java/org/apache/iceberg/mapping/TestNameMapping.java", "identifier": "TestNameMapping", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAllowsDuplicateNamesInSeparateContexts() {\n new NameMapping(MappedFields.of(\n MappedField.of(1, \"x\", MappedFields.of(MappedField.of(3, \"x\"))),\n MappedField.of(2, \"y\", MappedFields.of(MappedField.of(4, \"x\")))\n ));\n }", "class_method_signature": "T...
{ "fields": [ { "declarator": "DOT = Joiner.on('.')", "modifier": "private static final", "original_string": "private static final Joiner DOT = Joiner.on('.');", "type": "Joiner", "var_name": "DOT" }, { "declarator": "mapping", "modifier": "private final", "...
{ "body": "public static NameMapping of(MappedField... fields) {\n return new NameMapping(MappedFields.of(ImmutableList.copyOf(fields)));\n }", "class_method_signature": "NameMapping.of(MappedField... fields)", "constructor": false, "full_signature": "public static NameMapping of(MappedField... fields)", ...
{ "created": "11/19/2018 4:26:46 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 158256479, "size": null, "stargazer_count": null, "stars": 316, "updates": "2020-01-27T18:32:18+00:00", "url": "https://github.com/apache/incubat...
17278009_48
{ "fields": [ { "declarator": "dao", "modifier": "", "original_string": "ChangeSetDAO dao;", "type": "ChangeSetDAO", "var_name": "dao" } ], "file": "modules/enterprise/server/plugins/drift-mongodb/src/test/java/org/rhq/enterprise/server/plugins/drift/mongodb/dao/ChangeSetDAOT...
{ "body": "@Test(enabled = ENABLED)\n public void findEntriesWithResourceIdFilters() throws Exception {\n MongoDBChangeSet c1 = createChangeSet(COVERAGE, 1, 1, 1);\n MongoDBChangeSetEntry e1 = new MongoDBChangeSetEntry(\"c1-1.txt\", FILE_ADDED);\n c1.add(e1);\n dao.save(c1);\n\n ...
{ "fields": [ { "declarator": "morphia", "modifier": "private", "original_string": "private Morphia morphia;", "type": "Morphia", "var_name": "morphia" } ], "file": "modules/enterprise/server/plugins/drift-mongodb/src/main/java/org/rhq/enterprise/server/plugins/drift/mongodb/...
{ "body": "public List<MongoDBChangeSetEntry> findEntries(DriftCriteria criteria) {\n // TODO Add support for driftHandlingModes filter\n\n if (criteria.getFilterId() != null) {\n String[] ids = criteria.getFilterId().split(\":\");\n ObjectId changeSetId = new ObjectId(ids[0]);\n ...
{ "created": null, "fork": null, "fork_count": 85, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17278009, "size": 138394, "stargazer_count": 150, "stars": null, "updates": null, "url": "https://github.com/rhq-project/rhq" }
17278009_232
{ "fields": [], "file": "modules/core/domain/src/test/java/org/rhq/core/domain/drift/DriftDefinitionTest.java", "identifier": "DriftDefinitionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getInterval() {\n long interval = 3600L;\n Configuration config = new Configuration();\n config.put(new PropertySimple(\"interval\", interval));\n\n DriftDefinition driftDef = new DriftDefinition(config);\n\n assertEquals(driftDef.getInterval(), int...
{ "fields": [ { "declarator": "serialVersionUID = 1L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 1L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "id", "modifier": "@Column(name = \"...
{ "body": "public long getInterval() {\n return interval;\n }", "class_method_signature": "DriftDefinition.getInterval()", "constructor": false, "full_signature": "public long getInterval()", "identifier": "getInterval", "invocations": [], "modifiers": "public", "parameters": "()", "return":...
{ "created": null, "fork": null, "fork_count": 85, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17278009, "size": 138394, "stargazer_count": 150, "stars": null, "updates": null, "url": "https://github.com/rhq-project/rhq" }
17278009_265
{ "fields": [ { "declarator": "configFacet", "modifier": "", "original_string": "ResourceConfigurationFacet configFacet;", "type": "ResourceConfigurationFacet", "var_name": "configFacet" }, { "declarator": "structuredMgmt", "modifier": "", "original_string":...
{ "body": "@Test\n public void structuredConfigShouldGetLoaded() throws Exception {\n Configuration config = new Configuration();\n config.put(new PropertySimple(\"x\", \"1\"));\n config.put(new PropertySimple(\"y\", \"2\"));\n\n addDefaultExpectationsForLoad(config);\n\n Configu...
{ "fields": [ { "declarator": "log = LogFactory.getLog(StructuredConfigManagement.class)", "modifier": "private final", "original_string": "private final Log log = LogFactory.getLog(StructuredConfigManagement.class);", "type": "Log", "var_name": "log" } ], "file": "modules/co...
{ "body": "public Configuration executeLoad(int resourceId) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResouceConfiguratonFacet(resourceId);\n\n Configuration configuration = facet.loadStructuredConfiguration();\n\n if (configuration == null) {\n return ...
{ "created": null, "fork": null, "fork_count": 85, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17278009, "size": 138394, "stargazer_count": 150, "stars": null, "updates": null, "url": "https://github.com/rhq-project/rhq" }
17278009_273
{ "fields": [ { "declarator": "configFacet", "modifier": "", "original_string": "ResourceConfigurationFacet configFacet;", "type": "ResourceConfigurationFacet", "var_name": "configFacet" }, { "declarator": "rawConfigMgmt", "modifier": "", "original_string": ...
{ "body": "@Test\n public void nullShouldBeReturnedWhenRawIsNull() throws Exception {\n Set<RawConfiguration> rawConfigs = null;\n \n addDefaultExpectationsForLoad(rawConfigs);\n\n Configuration loadedConfig = rawConfigMgmt.executeLoad(resourceId);\n\n assertNull(loadedConfig, \"...
{ "fields": [ { "declarator": "log = LogFactory.getLog(RawConfigManagement.class)", "modifier": "private final", "original_string": "private final Log log = LogFactory.getLog(RawConfigManagement.class);", "type": "Log", "var_name": "log" } ], "file": "modules/core/plugin-cont...
{ "body": "public Configuration executeLoad(int resourceId) throws PluginContainerException {\n ResourceConfigurationFacet facet = loadResouceConfiguratonFacet(resourceId);\n\n Set<RawConfiguration> rawConfigs = facet.loadRawConfigurations();\n\n if (rawConfigs == null) {\n return null...
{ "created": null, "fork": null, "fork_count": 85, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17278009, "size": 138394, "stargazer_count": 150, "stars": null, "updates": null, "url": "https://github.com/rhq-project/rhq" }
17278009_224
{ "fields": [ { "declarator": "TEST_PLATFORM_TYPE = new ResourceType(\"test platform\", \"test plugin\", PLATFORM,\n null)", "modifier": "private static final", "original_string": "private static final ResourceType TEST_PLATFORM_TYPE = new ResourceType(\"test platform\", \"test plugin\", ...
{ "body": "@Test(expectedExceptions = { IllegalArgumentException.class })\n public void getBaseServerOrServiceShouldThrowIllegalArgumentExceptionOnNull() throws Exception {\n getBaseServerOrService(null);\n }", "class_method_signature": "ResourceUtilityTest.getBaseServerOrServiceShouldThrowIllegalArgum...
{ "fields": [], "file": "modules/core/domain/src/main/java/org/rhq/core/domain/util/ResourceUtility.java", "identifier": "ResourceUtility", "interfaces": "", "methods": [ { "class_method_signature": "ResourceUtility.getChildResource(Resource parent, ResourceType type, String key)", "constructo...
{ "body": "public static Resource getBaseServerOrService(Resource resource) {\n if (resource == null) {\n throw new IllegalArgumentException(\"resource is null\");\n }\n Resource current, parent = resource;\n do {\n current = parent;\n parent = current.getP...
{ "created": null, "fork": null, "fork_count": 85, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17278009, "size": 138394, "stargazer_count": 150, "stars": null, "updates": null, "url": "https://github.com/rhq-project/rhq" }
17278009_199
{ "fields": [], "file": "modules/core/client-api/src/test/java/org/rhq/core/clientapi/descriptor/PluginTransformerTest.java", "identifier": "PluginTransformerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void pluginDisplayNameShouldBeSetToDescriptorNameWhenItsDisplayNameIsNull() throws Exception {\n PluginDescriptor pluginDescriptor = new PluginDescriptor();\n pluginDescriptor.setName(\"testPlugin\");\n\n PluginTransformer transformer = new PluginTransformer();\n\n ...
{ "fields": [ { "declarator": "LOG = LogFactory.getLog(PluginTransformer.class)", "modifier": "private static final", "original_string": "private static final Log LOG = LogFactory.getLog(PluginTransformer.class);", "type": "Log", "var_name": "LOG" } ], "file": "modules/core/c...
{ "body": "public Plugin toPlugin(PluginDescriptor pluginDescriptor, URL pluginURL) {\n try {\n Plugin plugin = new Plugin();\n plugin.setName(pluginDescriptor.getName());\n\n if (pluginDescriptor.getDisplayName() == null) {\n plugin.setDisplayName(pluginDescript...
{ "created": null, "fork": null, "fork_count": 85, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 17278009, "size": 138394, "stargazer_count": 150, "stars": null, "updates": null, "url": "https://github.com/rhq-project/rhq" }