You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/04/22 23:01:51 UTC

[GitHub] [iceberg] rdblue commented on pull request #4466: Expression base operations

rdblue commented on PR #4466:
URL: https://github.com/apache/iceberg/pull/4466#issuecomment-1106981195

   @CircArgs, the method can still be called with bad arguments. Since we cannot hide it entirely, I think throwing an exception is a reasonable step to ensure it isn't misused.
   
   It's also interesting that we're actually hitting the `ValueError` in tests:
   
   ```
     ==================================== ERRORS ====================================
     _________ ERROR collecting tests/expressions/test_expressions_base.py __________
     tests/expressions/test_expressions_base.py:159: in <module>
         base.And(TestExpressionA(), TestExpressionB(), TestExpressionA()),
     src/iceberg/expressions/base.py:162: in __init__
         raise ValueError("Expected only left and right operands")
     E   ValueError: Expected only left and right operands
     _________ ERROR collecting tests/expressions/test_expressions_base.py __________
     tests/expressions/test_expressions_base.py:159: in <module>
         base.And(TestExpressionA(), TestExpressionB(), TestExpressionA()),
     src/iceberg/expressions/base.py:162: in __init__
         raise ValueError("Expected only left and right operands")
     E   ValueError: Expected only left and right operands
   ```
   
   Why is that case getting hit? I thought that we were controlling the inputs to `__init__`?


-- 
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-unsubscribe@iceberg.apache.org

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


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