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