Commit 8adf246
authored
Support quoted column identifiers for scan
# Rationale for this change
Our data lake uses old-school Kimball style quoted column names ("User
ID", "Customer Name" etc). The string parser for `row_filter` was unable
to parse this. Now it is.
example:
```python
# before
>> parser.parse(' "User Name" = 'ted')
ParseException: Expected '"', found ' '
# after
>> parser.parse(' "User Name" = 'ted')
EqualTo("User Name", "ted")
# Are these changes tested?
Yes a new test was added.
```
>[!NOTE]
> The `quoted_column_with_dots` previously errored `with "Expected '"',
found '.'"` _when using **double quotes only**_. It now raises error
text expecting an `'or'` value; I didn't toil over finding where the
exception is clobbered, because the error message between single and
double quote exceptions is inconsistent and I didn't really consider
this a polished/first-class error message. If this change is an issue, I
can dig further to try and revert the wording change; IMO raising the
same exception type is more than reasonable to consider the change
non-breaking.
# Are there any user-facing changes?
Yes quoted identifiers are now supportedrow_filter (#1863)1 parent da403d2 commit 8adf246
File tree
2 files changed
+16
-3
lines changed- pyiceberg/expressions
- tests/expressions
2 files changed
+16
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | 233 | | |
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
0 commit comments