vustef commented on issue #7299:
URL: https://github.com/apache/arrow-rs/issues/7299#issuecomment-3437364354

   @jkylling I like the idea of generalizing with `with_metadata_columns` 
instead of `with_row_number_column`. We need some sort of validation that 
RowNumber is a metadata column, I hope extension types implementation can have 
that.
   
   (1) is good, but it's not very user-friendly for "SELECT *" kind of scans. 
Could we get easily get schema and extend it with a new column?
   
   On second though, perhaps it's good to separate metadata columns from 
`with_schema`, i.e. to make it impossible to pass them there, but only through 
`with_metadata_columns`. Behind the scenes, they should be unified in a single 
`schema`, but they don't overwrite each other (this means that the builder has 
to keep track of these options separately, so that if any of them is updated, 
the combined schema is correctly updated).
   
   > let row_number_field = RowNumberField::new("my_row_num_col");
   
   Regarding this, I like the approach, but as utility. I think users could 
always do `field.with_nullable(true)` and violate the intention. So the 
question is where does the check for expected properties happen? Perhaps once 
we call `with_metadata_columns`?


-- 
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]

Reply via email to