Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Support INTERVAL in SQLite #85

Merged

Conversation

peasee
Copy link
Collaborator

@peasee peasee commented Sep 4, 2024

🗣 Description

  • Adds an ast_analzyer for SQLite, using an SQLiteIntervalVisitor to walk the AST and replace INTERVAL expressions with their relevant date() or datetime() expressions for date comparisons because SQLite does not natively support INTERVAL.

@peasee peasee marked this pull request as ready for review September 4, 2024 04:26
@peasee peasee changed the title Fix/support interval in sqlite fix: Support INTERVAL in SQLite Sep 4, 2024
@phillipleblanc phillipleblanc merged commit 5f9d49a into datafusion-contrib:main Sep 4, 2024
3 checks passed
phillipleblanc added a commit that referenced this pull request Sep 4, 2024
* wip

* duckdb streaming

* clippy

* arrow to arrow stream

* error message

* fix: Support `INTERVAL` in SQLite (#85)

* poc: Support interval in SQLite using an AST analyzer

* Refactoring

* u64 -> i64

* fix: Support INTERVAL expressions in SQLite

* docs: Add comment about flattening arguments list

* refactor: Rename SQLiteVisitor to SQLiteIntervalVisitor

* test: Add some tests

---------

Co-authored-by: Phillip LeBlanc <[email protected]>

* Use DuckDB streaming

* Fixes

* Fix feature flagging

* Fix lint

* Add spiceai branch to pull_request

---------

Co-authored-by: peasee <[email protected]>
Co-authored-by: Phillip LeBlanc <[email protected]>
hozan23 pushed a commit to hozan23/datafusion-table-providers that referenced this pull request Sep 19, 2024
* wip

* duckdb streaming

* clippy

* arrow to arrow stream

* error message

* fix: Support `INTERVAL` in SQLite (datafusion-contrib#85)

* poc: Support interval in SQLite using an AST analyzer

* Refactoring

* u64 -> i64

* fix: Support INTERVAL expressions in SQLite

* docs: Add comment about flattening arguments list

* refactor: Rename SQLiteVisitor to SQLiteIntervalVisitor

* test: Add some tests

---------

Co-authored-by: Phillip LeBlanc <[email protected]>

* Use DuckDB streaming

* Fixes

* Fix feature flagging

* Fix lint

* Add spiceai branch to pull_request

---------

Co-authored-by: peasee <[email protected]>
Co-authored-by: Phillip LeBlanc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants