You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mkdocs/docs/row-filter-syntax.md
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,11 @@
17
17
18
18
# Row Filter Syntax
19
19
20
-
In addtion to the primary [Expression DSL](expression-dsl.md), PyIceberg provides a string-based statement interface for filtering rows in Iceberg tables. This guide explains the syntax and provides examples for supported operations.
20
+
In addition to the primary [Expression DSL](expression-dsl.md), PyIceberg provides a string-based statement interface for filtering rows in Iceberg tables. This guide explains the syntax and provides examples for supported operations.
21
21
22
22
The row filter syntax is designed to be similar to SQL WHERE clauses. Here are the basic components:
23
23
24
-
###Column References
24
+
## Column References
25
25
26
26
Columns can be referenced using either unquoted or quoted identifiers:
27
27
@@ -30,7 +30,7 @@ column_name
30
30
"column.name"
31
31
```
32
32
33
-
###Literals
33
+
## Literals
34
34
35
35
The following literal types are supported:
36
36
@@ -137,6 +137,7 @@ price IS NOT NULL AND price > 100 AND quantity > 0
137
137
## Common Pitfalls
138
138
139
139
1.**String Quoting**: Always use single quotes for string literals. Double quotes are reserved for column identifiers.
140
+
140
141
```sql
141
142
-- Correct
142
143
name ='John'
@@ -146,6 +147,7 @@ price IS NOT NULL AND price > 100 AND quantity > 0
146
147
```
147
148
148
149
2.**Wildcard Usage**: The `%` wildcard in LIKE patterns can only appear at the end.
150
+
149
151
```sql
150
152
-- Correct
151
153
name LIKE'John%'
@@ -155,6 +157,7 @@ price IS NOT NULL AND price > 100 AND quantity > 0
155
157
```
156
158
157
159
3.**Case Sensitivity**: Boolean literals (`true`/`false`) are case insensitive, but string comparisons are case sensitive.
160
+
158
161
```sql
159
162
-- All valid
160
163
is_active = true
@@ -169,4 +172,4 @@ price IS NOT NULL AND price > 100 AND quantity > 0
169
172
170
173
1. For complex use cases, use the primary [Expression DSL](expression-dsl.md)
171
174
2. When using multiple conditions, consider the order of operations (NOT > AND > OR)
172
-
3. For string comparisons, be consistent with case usage
175
+
3. For string comparisons, be consistent with case usage
0 commit comments