yunchipang commented on code in PR #7100:
URL: https://github.com/apache/datafusion-comet/pull/7100#discussion_r4319239552
##########
native/core/src/execution/operators/iceberg_write.rs:
##########
@@ -1488,6 +1488,22 @@ fn parse_iceberg_schema(json: &str) ->
DFResult<IcebergSchemaRef> {
let schema: IcebergSchema = serde_json::from_str(json).map_err(|e| {
DataFusionError::Internal(format!("Failed to parse iceberg schema
JSON: {e}"))
})?;
+ // iceberg-java writes no column for a top-level `unknown` field.
+ let fields = schema.as_struct().fields();
+ let kept: Vec<_> = fields
+ .iter()
+ .filter(|f| *f.field_type != Type::Primitive(PrimitiveType::Unknown))
Review Comment:
thanks for catching this! fixed in the latest commit: the gate now falls
back to `iceberg-java` when a partition field is sourced from a top-level
`unknown` column, added a regression test (it fails with `Field not found`
without the fix), and noted the fallback in the user and contributor guides.
could you take another look when you have time? thanks!
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]