unical1988 commented on code in PR #728:
URL: https://github.com/apache/incubator-xtable/pull/728#discussion_r2269892034
##########
xtable-core/src/main/java/org/apache/xtable/reflection/ReflectionUtils.java:
##########
@@ -43,17 +44,31 @@ public static <T> T createInstanceOfClass(String className,
Object... constructo
if (constructorArgs.length == 0) {
return clazz.newInstance();
}
- Class<?>[] constructorArgTypes =
+ /*Class<?>[] constructorArgTypes =
Review Comment:
The iceberb sync error is at IcebergePartitionSpecExtractor (cannot find
column date):
```
public PartitionSpec toIceberg(List<InternalPartitionField> partitionFields,
Schema tableSchema) {
if (partitionFields == null || partitionFields.isEmpty()) {
return PartitionSpec.unpartitioned();
}
PartitionSpec.Builder partitionSpecBuilder =
PartitionSpec.builderFor(tableSchema);
for (InternalPartitionField partitioningField : partitionFields) {
String fieldPath = partitioningField.getSourceField().getPath();
switch (partitioningField.getTransformType()) {
case YEAR:
partitionSpecBuilder.year(fieldPath); //TODO check error here
cannot find column
break;
case MONTH:
partitionSpecBuilder.month(fieldPath);
break;
case DAY:
partitionSpecBuilder.day(fieldPath);
break;
case HOUR:
partitionSpecBuilder.hour(fieldPath);
break;
case VALUE:
partitionSpecBuilder.identity(fieldPath);
break;
case BUCKET:
partitionSpecBuilder.bucket(
fieldPath,
(int)
partitioningField.getTransformOptions().get(InternalPartitionField.NUM_BUCKETS));
break;
default:
throw new IllegalArgumentException(
"Unsupported type: " + partitioningField.getTransformType());
}
}
return partitionSpecBuilder.build();
}
```
--
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]