mattmartin14 commented on PR #1534:
URL: https://github.com/apache/iceberg-python/pull/1534#issuecomment-2631960225

   > > datetime.date is not handled in this function: 
https://github.com/apache/iceberg-python/blob/main/pyiceberg/expressions/literals.py#L124
   > 
   > @mattmartin14 @tscottcoombes1 any of you interested in adding support for 
`date` there? :)
   > 
   > We can reuse `date_to_days`:
   > 
   > 
https://github.com/apache/iceberg-python/blob/5018efc203b6393898a000d98e6f305f287e42a7/pyiceberg/utils/datetime.py#L55-L57
   
   How wold i weave the "date_to_days" into this existing code below? Any 
thoughts on that?:
   
   ```python
   def get_filter_list(df: pyarrow_table, join_cols: list) -> BooleanExpression:
   
       unique_keys = df.select(join_cols).group_by(join_cols).aggregate([])
   
       pred = None
   
       if len(join_cols) == 1:
           pred = In(join_cols[0], unique_keys[0].to_pylist())
       else:
           pred = Or(*[
               And(*[
                   EqualTo(col, row[col])
                   for col in join_cols
               ])
               for row in unique_keys.to_pylist()
           ])
   
       return pred
   ```


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