Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pyiceberg/expressions/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
"""Parser that converts a SQL-like filter string into an Iceberg BooleanExpression.

This module enables:
- Parsing comparisons (<, <=, >, >=, =, !=, <>), BETWEEN, IN and NOT IN.
- Parsing IS [NOT] NULL, IS [NOT] NAN and LIKE (prefix matching only).
- Combining predicates with NOT, AND and OR.

Note:
The grammar should follow ANSI SQL where possible, so that a filter behaves the same
as it would in a SQL engine. For example, identifiers are quoted with double quotes,
string literals with single quotes, and a single quote within a string is escaped by
doubling it. Deviations from ANSI SQL should be avoided when extending the grammar.
"""

import re
from decimal import Decimal

Expand Down
Loading