Skip to content

Commit 45ab0d1

Browse files
committed
remove debug printlines in test
1 parent 053267c commit 45ab0d1

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

coral-schema/src/main/java/com/linkedin/coral/schema/avro/MergeHiveSchemaWithAvro.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,19 +177,13 @@ public Schema mapKeyPartner(Schema partner) {
177177
@Override
178178
public Schema mapValuePartner(Schema partner) {
179179
Schema schema = SchemaUtilities.extractIfOption(partner);
180-
if (schema.getType() != Schema.Type.MAP) {
181-
return null;
182-
}
183-
return schema.getValueType();
180+
return (schema.getType() == Schema.Type.MAP) ? schema.getValueType() : null;
184181
}
185182

186183
@Override
187184
public Schema listElementPartner(Schema partner) {
188185
Schema schema = SchemaUtilities.extractIfOption(partner);
189-
if (schema.getType() != Schema.Type.ARRAY) {
190-
return null;
191-
}
192-
return schema.getElementType();
186+
return (schema.getType() == Schema.Type.ARRAY) ? schema.getElementType() : null;
193187
}
194188

195189
@Override

coral-schema/src/test/java/com/linkedin/coral/schema/avro/MergeHiveSchemaWithAvroTests.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,6 @@ public void shouldHandleSingleElementUnionsInAllTypes() {
285285
Schema expected = avro;
286286

287287
Schema actual = merge(hive, avro);
288-
289-
System.out.println("\n=== INPUT AVRO SCHEMA ===");
290-
System.out.println(avro.toString(true));
291-
System.out.println("\n=== EXPECTED OUTPUT SCHEMA ===");
292-
System.out.println(expected.toString(true));
293-
System.out.println("\n=== ACTUAL OUTPUT SCHEMA ===");
294-
System.out.println(actual.toString(true));
295-
System.out.println("\n=== END ===\n");
296288

297289
assertSchema(expected, actual);
298290
}
@@ -331,14 +323,6 @@ public void shouldHandleSingleElementUnionsWithHiveUnionType() {
331323
Schema expected = avro;
332324

333325
Schema actual = merge(hive, avro);
334-
335-
System.out.println("\n=== INPUT AVRO SCHEMA (HiveUnionType test) ===");
336-
System.out.println(avro.toString(true));
337-
System.out.println("\n=== EXPECTED OUTPUT SCHEMA (HiveUnionType test) ===");
338-
System.out.println(expected.toString(true));
339-
System.out.println("\n=== ACTUAL OUTPUT SCHEMA (HiveUnionType test) ===");
340-
System.out.println(actual.toString(true));
341-
System.out.println("\n=== END ===\n");
342326

343327
assertSchema(expected, actual);
344328
}

0 commit comments

Comments
 (0)