kevinjqliu commented on code in PR #2335:
URL: https://github.com/apache/iceberg-python/pull/2335#discussion_r2280482267


##########
tests/expressions/test_parser.py:
##########
@@ -238,3 +238,19 @@ def test_quoted_column_with_dots() -> None:
 
 def test_quoted_column_with_spaces() -> None:
     assert EqualTo("Foo Bar", "data") == parser.parse("\"Foo Bar\" = 'data'")
+
+def test_valid_between() -> None:
+    assert And(left=GreaterThanOrEqual(Reference(name="foo"), LongLiteral(1)), 
right=LessThanOrEqual(Reference(name="foo"), LongLiteral(3))) == 
parser.parse("foo between 1 and 3")
+    assert And(left=GreaterThanOrEqual(Reference(name="foo"), LongLiteral(1)), 
right=LessThanOrEqual(Reference(name="foo"), LongLiteral(1))) == 
parser.parse("foo between 1 and 1")
+    assert And(left=GreaterThanOrEqual(Reference(name="foo"), 
DecimalLiteral(Decimal(1.0))), right=LessThanOrEqual(Reference(name="foo"), 
DecimalLiteral(Decimal(4.0)))) == parser.parse("foo between 1.0 and 4.0")
+

Review Comment:
   nit: we can also add this as a test
   ```
   parser.parse("foo between 1 and 3") == parser.parse("1 <= foo and foo <= 3")
   ```



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