[Bug]: Python SDK to_string() crashes with AttributeError on queries with limit/offset or literal filters
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Start in python/infinity_sdk/infinity/remote_thrift/utils.py, where parsed_expression_to_string() serializes query expressions, and follow RemoteTable.to_string() from the reproduction. Run the no-server examples for filter, limit, and offset, then add or run the regression coverage mentioned in the issue. Done means these cases return the expected JSON description without AttributeError.
Written by the indexing model from the issue text.
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Version or Commit ID
main @ 4954148 (current main as of 2026-09-08)
Other environment information
Actual behavior and How to reproduce it
parsed_expression_to_string() in python/infinity_sdk/infinity/remote_thrift/utils.py reads literal values from the wrong object: expr_type.i64_value / f64_value / str_value / i64_array_value / ... instead of expr_type.constant_expr.. Only the Boolean case uses the right object. ParsedExprType has no such attributes, so RemoteTable.to_string() raises AttributeError on any query carrying a limit, an offset, or a literal in its filter.
Repro (no server needed):
from infinity.remote_thrift.table import RemoteTable
t = RemoteTable(conn=None, db_name="default_db", table_name="t")
t.output(["c1"]).limit(10).to_string()
# AttributeError: 'ParsedExprType' object has no attribute 'i64_value'
Also crashes: .filter("c2 > 3"), .offset(5), or a string literal like .filter("name = 'abc'").
Expected behavior
to_string() returns the JSON description of the query, e.g. {"db": "default_db", "table": "t", "columns": ["c1"], "limit": "10"}.
Additional information
Fix: read the fields from expr_type.constant_expr in every literal case. PR with the fix plus a regression test (filter + limit + offset through to_string()) coming.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 445
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from infiniflow/infinity
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
infiniflow/infinity#3502 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infiniflow/infinity#3500 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
infiniflow/infinity#3492 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
infiniflow/infinity#3491 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
infiniflow/infinity#3484 ·
All issues in infiniflow/infinity
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·