samredai opened a new pull request #3399:
URL: https://github.com/apache/iceberg/pull/3399


   This adds `Operations` to the beginning of an `expressions.py` file. This PR 
might also be a good venue to discuss more on the goal of making the python 
library "more pythonic" and maybe agree on a few concrete patterns.
   
   For starters, I'd like to highlight the expressions directory as a whole. 
Here's a list of linecounts:
   ```
   21 ./java_variables/__init__.py
   73 ./term.py
   75 ./transform.py
   91 ./binder.py
   92 ./evaluator.py
   107 ./__init__.py
   114 ./projections.py
   114 ./reference.py
   117 ./residual_evaluator.py
   161 ./expression_parser.py
   161 ./inclusive_manifest_evaluator.py
   188 ./inclusive_metrics_evaluator.py
   221 ./strict_metrics_evaluator.py
   252 ./expression.py
   295 ./predicate.py
   299 ./expressions.py
   591 ./literals.py
   2972 total
   ```
   
   For python standards, the logic here is spread very thin across many small 
files. I would argue that this could all be neatly (by python standards) 
contained in a single `expressions.py` file. Furthermore, I'm pretty confident 
that the total line count of 2972 could be reduced substantially to 1500-2000 
lines, which would be very reasonable. One way is by consolidating some of the 
long streams of class inheritance into bulkier yet well structured single 
classes where it makes sense.
   
   There's definitely a lot of logical components in the legacy expressions 
implementation, which are listed in Issue 
[3217](https://github.com/apache/iceberg/issues/3217) but as those are trimmed, 
I think the overall expressions logic will be less verbose.


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