Comments (7)
Hi Dennis @killme2008 Do I get it right that the exception comes from the DataFusion?
If that's the case is there any established way of "intercepting" the AST before sending it to plan? Thank you!
I think we can transform the Expr
just like type alias:
https://github.com/GreptimeTeam/greptimedb/blob/main/src/sql/src/statements/transform/type_alias.rs
Adds a new transform rule and add it to
from greptimedb.
@etolbakov Looks like compound signed number case not processed properly:
mysql> SELECT INTERVAL '-1h5m';
+----------------------------------------------+
| IntervalMonthDayNano("18446740773709551616") |
+----------------------------------------------+
| P0Y0M0DT0H-55M0S |
+----------------------------------------------+
mysql> SELECT INTERVAL '-1h-5m';
ERROR 1815 (HY000): Failed to plan SQL: Parser error: Invalid input syntax for type interval: "-1 h- 5 minutes"
Would you like to fix it?
from greptimedb.
ohhh....my bad, yeah, let me give it a go
from greptimedb.
I have crafted a document detailing the interval
type. Would you kindly provide feedback upon review?
from greptimedb.
@etolbakov I have an idea. Maybe we can apply this transform rule to the cast(string as interval)
expression too? Then it can be applied to the interval in the form of '3y2mon'::interval
. What do you think about it?
https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.Expr.html#variant.Cast
https://docs.rs/datafusion/latest/datafusion/logical_expr/struct.TryCast.html
from greptimedb.
It's a great idea! Let me make an assessment (and reopen the ticket 😁)
from greptimedb.
Hi Dennis @killme2008
Do I get it right that the exception comes from the DataFusion?
If that's the case is there any established way of "intercepting" the AST before sending it to plan?
Thank you!
from greptimedb.
Related Issues (20)
- Reconsider bg_worker runtime size and dedicated heartbeat tasks
- Workflow run 'GreptimeDB Nightly Build' failed HOT 2
- Workflow run 'Release' failed
- Workflow run 'Release' failed HOT 5
- Sqlness tests failed HOT 1
- Program panic when profiling HOT 2
- `information_schema.region_peers` returns same `region_id` multiple times HOT 1
- Remove the `StandaloneKafkaConfig` struct
- [Tracking Issue] Make region failover great again
- Integration test for events API HOT 1
- Incorrect peer_addr in cluster_info meta table HOT 5
- Workflow run 'Release' failed HOT 5
- Open table format compatibility
- [Tracking Issue] Support put directory and compression in Puffin
- Workflow run 'GreptimeDB Nightly Build' failed HOT 2
- Perhaps we can use a Maintenance Mode Sentinel to replace `kv_backend`.
- Supports input interval type in the format of ISO 8601 HOT 2
- error: casting references to a bigger memory layout than the backing allocation is undefined behavior, even if the reference is unused HOT 2
- Database and table data statistics info
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from greptimedb.