You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xtable.apache.org by "vinishjail97 (via GitHub)" <gi...@apache.org> on 2025/04/01 21:42:06 UTC
Re: [PR] Handle timestamp_ntz in delta and iceberg [incubator-xtable]
vinishjail97 commented on code in PR #647:
URL: https://github.com/apache/incubator-xtable/pull/647#discussion_r2023715136
##########
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(
+ InternalField.builder()
+ .name("float_field")
+ .schema(
+ InternalSchema.builder()
+ .name("float")
+ .dataType(InternalType.FLOAT)
+ .isNullable(true)
+ .build())
+ .build());
+ InternalSchema schema2 = getInternalSchema().toBuilder().fields(fields2).build();
+ InternalTable table1 = getInternalTable(tableName, basePath, schema1, null, LAST_COMMIT_TIME);
+ InternalTable table2 = getInternalTable(tableName, basePath, schema2, null, LAST_COMMIT_TIME);
+
+ InternalDataFile dataFile1 = getDataFile(1, Collections.emptyList(), basePath);
+ InternalDataFile dataFile2 = getDataFile(2, Collections.emptyList(), basePath);
+ InternalDataFile dataFile3 = getDataFile(3, Collections.emptyList(), basePath);
+
+ InternalSnapshot snapshot1 = buildSnapshot(table1, "0", dataFile1, dataFile2);
+ InternalSnapshot snapshot2 = buildSnapshot(table2, "1", dataFile2, dataFile3);
+
+ TableFormatSync.getInstance()
+ .syncSnapshot(Collections.singletonList(conversionTarget), snapshot1);
+ // Delta standalone library can't read versions (3,7) and needs delta kernel dependency.
Review Comment:
Handled the validation using spark for now, upgrading to delta-kernel will be handled separately.
--
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: commits-unsubscribe@xtable.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org