the-other-tim-brown commented on code in PR #647:
URL: https://github.com/apache/incubator-xtable/pull/647#discussion_r2023652756
##########
xtable-core/src/main/java/org/apache/xtable/delta/DeltaSchemaExtractor.java:
##########
@@ -110,11 +115,11 @@ private InternalSchema toInternalSchema(
break;
case "timestamp":
type = InternalType.TIMESTAMP;
- // Timestamps in Delta are microsecond precision by default
- metadata =
- Collections.singletonMap(
- InternalSchema.MetadataKey.TIMESTAMP_PRECISION,
- InternalSchema.MetadataValue.MICROS);
+ metadata = DEFAULT_TIMESTAMP_PRECISION_METADATA;
+ break;
+ case "timestamp_ntz":
Review Comment:
Can you add a case to the unit test for this?
##########
xtable-core/src/test/java/org/apache/xtable/delta/TestDeltaSync.java:
##########
@@ -431,6 +433,46 @@ public void
testGetTargetCommitIdentifierWithNullSourceIdentifier() throws Excep
assertFalse(unmappedTargetId.isPresent());
}
+ @Test
+ public void testTimestampNtz() {
+ InternalSchema schema1 = getInternalSchemaWithTimestampNtz();
+ List<InternalField> fields2 = new ArrayList<>(schema1.getFields());
+ fields2.add(
Review Comment:
Have you tested whether the write works if the initial schema contains the
timestamp_ntz?
--
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]