Comments (7)
@jayzhan211 asks #10374 (comment)
@alamb Do you think we should also rewrite the array operator to function in parser step? It is currently in optimizer step. I think the downside of moving array rewrite in parser step is that if any user expects different array function with the same syntax, then they can't do it since we don't have "user-defined" parser mechanism now. But the benefit is that we can eliminate intermediate binary expression.
The array operator to function is syntax like
array1 || array2
->array_concat
, which is in ArrayFunctionRewriter now, so I'm thinking about whether we should move this to the parser or not.
I personally think moving the translation of array1 || array
--> array_concat
to the parser is a better idea as it will be more efficient than trying to rewrite an expr after the fact
from arrow-datafusion.
I rethought the issue in #10102, and I found it is strongly related to the idea of the user-defined parser mentioned here, that we can define the returned Expr
given the registered function.
from arrow-datafusion.
#11180 -- looking very nice
from arrow-datafusion.
In general, I think the idea of allowing users to customize the behavior of the sql planner is reasonable. However I am not entirely sure if we need to modify the planner itself, or if it would be a better approach for users to implement rewrite passes after the existing planner runs 🤔
from arrow-datafusion.
For anyone following along, @samuelcolvin @jayzhan211 and myself are discussing proposals for this API in
from arrow-datafusion.
To rewrite with sql planner
- date_part
- create_struct
- create_named_struct
- sql_overlay_to_expr
- sql_position_to_expr
- sql_substring_to_expr
- sql_compound_identifier_to_expr
from arrow-datafusion.
I filed #11207 to track the work to move the remaining functions to the user defined extension planner so closing this one
from arrow-datafusion.
Related Issues (20)
- order_by not respected for window functions using udaf HOT 2
- Window functions create unwanted projection HOT 9
- Improve lpad udf by using a GenericStringBuilder HOT 1
- DataFusion weekly project plan (Andrew Lamb) - Aug 12, 2024 HOT 1
- Disable `create_default_catalog` when the exist session state has default catalog for `SessionStateBuilder` HOT 1
- Improve performance of `REPEAT` functions HOT 2
- Internal error: Empty iterator passed to ScalarValue::iter_to_array HOT 1
- `optimize_projections` fails when eagerly selecting from a join with ambigious column names HOT 1
- Speed up rpad implementation to use StringBuilder HOT 1
- Remove unused config value `scalar_update_factor` HOT 1
- 在文件prost.rs文件中定义的"pub struct Schema"等结构体,需要使用"#[derive(Serialize)]"属性生成序列化的方法。 HOT 4
- Improve error message for invalid aggregate queries
- Support different aggregate expression (outside SELECT list) in ORDER BY list HOT 2
- Allow suppling a table schema to ParquetExec HOT 7
- Panics in `MIN()/MAX()` aggregate functions (SQLancer) HOT 3
- Internal error in `approx_percentile_cont()` aggregate function (SQLancer) HOT 3
- Invalid aggregate SQL query with `HAVING` can be executed without error (SQLancer-TLP) HOT 3
- Unable to access LogicalPlanBuilder.plan inside a new trail implementation
- Make properties in phyiscal-plan/aggregates public
- COUNT(expr) always returns the COUNT(colname) HOT 7
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 arrow-datafusion.