samredai commented on pull request #3952:
URL: https://github.com/apache/iceberg/pull/3952#issuecomment-1019331217


   There was some discussion in previous python syncs about decreasing the size 
of this part of the codebase by not having a literal class defined separately 
for each type. I don't think we reached a consensus so maybe we can do that 
here.
   
   I believe the only place literals are used is in the expressions logic which 
handles filtering of the metadata (partitions, manifest files, etc). Types are 
used in a lot of places since `StructType` is used to define schema in many 
places (table schema as well as the schema of metadata files).
   
   I like the intuitiveness of only having to look in one place to understand 
how a type is defined as well as how an instance of that type (a literal) 
behaves and usage feels very close to how the python standard library works. If 
the types and literals actually aren't as tightly coupled as the class names in 
the legacy and java implementation might indicate, then I can see how keeping 
them as separate classes could be better and they can be tied together by just 
an attribute on the literal classes. Curious to hear everyone else's thoughts.


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

Reply via email to