vamsikarnika commented on code in PR #639:
URL: https://github.com/apache/incubator-xtable/pull/639#discussion_r1942716593


##########
xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaSchemaExtractor.java:
##########
@@ -360,101 +325,14 @@ public void testTimestamps() {
                         .build()))
             .build();
 
-    InternalSchema internalSchemaTimestampNtz =
-        InternalSchema.builder()
-            .name("struct")
-            .dataType(InternalType.RECORD)
-            .isNullable(false)
-            .fields(
-                Arrays.asList(
-                    InternalField.builder()
-                        .name("requiredTimestampNtz")
-                        .schema(
-                            InternalSchema.builder()
-                                .name("timestampNtz")
-                                .dataType(InternalType.TIMESTAMP_NTZ)
-                                .isNullable(false)
-                                .build())
-                        .build(),
-                    InternalField.builder()
-                        .name("optionalTimestampNtz")
-                        .schema(
-                            InternalSchema.builder()
-                                .name("timestampNtz")
-                                .dataType(InternalType.TIMESTAMP_NTZ)
-                                .isNullable(true)
-                                .build())
-                        
.defaultValue(InternalField.Constants.NULL_DEFAULT_VALUE)
-                        .build()))
-            .build();
-
     StructType structRepresentationTimestamp =
         new StructType()
             .add("requiredTimestamp", DataTypes.TimestampType, false)
             .add("optionalTimestamp", DataTypes.TimestampType, true);
 
-    StructType structRepresentationTimestampNtz =
-        new StructType()
-            .add("requiredTimestampNtz", DataTypes.LongType, false)
-            .add("optionalTimestampNtz", DataTypes.LongType, true);
-
-    Assertions.assertEquals(
-        structRepresentationTimestamp,
-        
DeltaSchemaExtractor.getInstance().fromInternalSchema(internalSchemaTimestamp));
     Assertions.assertEquals(
         internalSchemaTimestamp,
         
DeltaSchemaExtractor.getInstance().toInternalSchema(structRepresentationTimestamp));
-    Assertions.assertEquals(
-        structRepresentationTimestampNtz,
-        
DeltaSchemaExtractor.getInstance().fromInternalSchema(internalSchemaTimestampNtz));
-  }
-
-  @Test
-  public void testEnums() {
-    Map<InternalSchema.MetadataKey, Object> requiredEnumMetadata = new 
HashMap<>();
-    requiredEnumMetadata.put(InternalSchema.MetadataKey.ENUM_VALUES, 
Arrays.asList("ONE", "TWO"));
-    Map<InternalSchema.MetadataKey, Object> optionalEnumMetadata = new 
HashMap<>();
-    optionalEnumMetadata.put(
-        InternalSchema.MetadataKey.ENUM_VALUES, Arrays.asList("THREE", 
"FOUR"));
-
-    InternalSchema internalSchema =
-        InternalSchema.builder()
-            .name("struct")
-            .dataType(InternalType.RECORD)
-            .isNullable(false)
-            .fields(
-                Arrays.asList(
-                    InternalField.builder()
-                        .name("requiredEnum")
-                        .schema(
-                            InternalSchema.builder()
-                                .name("REQUIRED_ENUM")
-                                .dataType(InternalType.ENUM)
-                                .isNullable(false)
-                                .metadata(requiredEnumMetadata)
-                                .build())
-                        .build(),
-                    InternalField.builder()
-                        .name("optionalEnum")
-                        .schema(
-                            InternalSchema.builder()
-                                .name("OPTIONAL_ENUM")
-                                .dataType(InternalType.ENUM)
-                                .isNullable(true)
-                                .metadata(optionalEnumMetadata)
-                                .build())
-                        
.defaultValue(InternalField.Constants.NULL_DEFAULT_VALUE)
-                        .build()))
-            .build();
-
-    StructType structRepresentation =
-        new StructType()
-            .add("requiredEnum", DataTypes.StringType, false)
-            .add("optionalEnum", DataTypes.StringType, true);
-
-    Assertions.assertEquals(
-        structRepresentation,
-        DeltaSchemaExtractor.getInstance().fromInternalSchema(internalSchema));

Review Comment:
   These tests are moved to TestSparkSchemaExtractor class



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to