c-thiel commented on PR #587:
URL: https://github.com/apache/iceberg-rust/pull/587#issuecomment-2337769487

   @liurenjie1024 thanks for the Feedback!
   
   > > My first point of the opening statement: Do we re-write our SortOrder 
and add the schema to PartitionSpec so that we can match on names like Java 
does or not?
   > 
   > To be honest, I don't quite understand the use case. We can ask for 
background of this in dev channel, but I think this is not a blocker of this 
pr, we can always add this later.
   
   The problem in changing it later is that it changes the semantic of the 
function. Right now we expect source_id to match the `current_schema()` (which 
is also the reason why I expose it during build). Java doesn't do this, 
instead, it looks up the name by id in the schema bound to a SortOrder or 
PartitionSpec, and then searches for the same name in the new schema to use it.
   
   In my opinion ids are much cleaner than names (we might have dropped and 
re-added a column with the same name in the meantime), so I am OK with going 
forward. However, moving over to java semantics will require new endpoints 
(i.e. `add_migrate_partition_spec` or so), which takes a bound partition spec 
in contrast to the unbound spec we currently pass in. 
   
   Give me a thumbs up if that's OK for you. I'll also open a discussion in the 
dev channel to get some more opinions.


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to