Fokko commented on code in PR #965:
URL: https://github.com/apache/iceberg-python/pull/965#discussion_r1707389618
##########
tests/expressions/test_parser.py:
##########
@@ -199,3 +199,7 @@ def test_with_function() -> None:
parser.parse("foo = 1 and lower(bar) = '2'")
assert "Expected end of text, found 'and'" in str(exc_info)
+
+
+def test_nested_field_equality() -> None:
+ assert EqualTo("foo.first", "a") == parser.parse("foo.first == 'a'")
Review Comment:
I think the key to success is to have some kind of syntax for quoting
literals. For example:
https://spark.apache.org/docs/latest/sql-ref-literals.html
Then we can parse something like:
```python
'a.b' -> Reference(('a.b',))
'a.b'.c -> Reference(('a.b', 'c'))
a.b.c -> Reference(('a', 'b', 'c'))
```
Or folks have to use:
```python
row_filter=EqualTo(('a.b',), 123)
row_filter=EqualTo(('a.b', 'c'), 123)
row_filter=EqualTo(('a', 'b', 'c'), 123)
```
--
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]