apache / apache/sedona-db

Error for columns with reserved keywords is difficult to debug

Open
#274 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
503
Forks
61
Avg merge
2d 5h
Merged PRs (30d)
91

Description

There are now some errors when naming columns with reserved words. I had a recent issue with `end` and another user reported the name `context` as an issue but I couldn't reproduce.

```rust
import sedona.db
import pandas as pd

sd = sedona.db.connect()
df = pd.DataFrame({"start": [1, 2, 3], "end": [1, 2, 3], "idx": [1, 2, 3]})
sd.create_data_frame(df).to_view("foofy")
sd.sql("""SELECT idx, end FROM foofy""").show()
#> SedonaError: SQL error: ParserError("Expected: end of statement, found: end at Line: 1, Column: 13")
```

If we'd like to improve this error we probably have to see which PR changed this upstream and have a look.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure through the documented sedona.db.connect, create_data_frame, to_view, and sql entry points using the example with end and context. Then identify which upstream parser change or pull request introduced the error and trace the relevant database parsing path. Done means the reserved-column case produces a more useful error, with regression coverage if the relevant test location is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python, rust
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.