Comments (4)
At the point of push down filter
, we no longer have Expr::Unnest
but Expr::Column or Expr::BinaryExpr
expr: BinaryExpr(BinaryExpr { left: Column(Column { relation: None, name: "unnest(t.a)" }), op: Gt, right: Literal(Int32(3)) })
Instead of checking whether there is unnest
contained in filter expression, should we move the conversion of Expr::Unnest to LogicalPlan::Unnest try_process_unnest
to the optimization step, specifically at some point AFTER push down filter step? I think we can check whether unnest
exists by Expr::Unnest
, and also I think we don't need to specialize LogicalPlan::Unnest
in push down filter
step, we can deal with LogicalPlan::Projection
only, Expr::Unnest should be part of the LogicalPlan::Unnest
. After push down filter
, we convert Expr::Unnest to LogicalPlan::Unnest
But ideally logical plan optimization should be optional, which means even the optimization step is skipped, we still expect to get the result. Based on this, it might not be a good idea to move the conversion to optmization step 🤔
from arrow-datafusion.
It seems to be supported on the main branch.
DataFusion CLI v39.0.0
> create table t (a int[]) as values ([1,2,3]), ([4,5,6]);
0 row(s) fetched.
Elapsed 0.030 seconds.
> select ua from (select unnest(a) as ua from t) where ua > 3;
+----+
| ua |
+----+
| 4 |
| 5 |
| 6 |
+----+
3 row(s) fetched.
Elapsed 0.009 seconds.
from arrow-datafusion.
It seems to be supported on the main branch.
DataFusion CLI v39.0.0 > create table t (a int[]) as values ([1,2,3]), ([4,5,6]); 0 row(s) fetched. Elapsed 0.030 seconds. > select ua from (select unnest(a) as ua from t) where ua > 3; +----+ | ua | +----+ | 4 | | 5 | | 6 | +----+ 3 row(s) fetched. Elapsed 0.009 seconds.
I still get the error 🤔
from arrow-datafusion.
It seems to be supported on the main branch.
DataFusion CLI v39.0.0 > create table t (a int[]) as values ([1,2,3]), ([4,5,6]); 0 row(s) fetched. Elapsed 0.030 seconds. > select ua from (select unnest(a) as ua from t) where ua > 3; +----+ | ua | +----+ | 4 | | 5 | | 6 | +----+ 3 row(s) fetched. Elapsed 0.009 seconds.I still get the error 🤔
Ok, my bad. It is introduced by the latest PR #10974
from arrow-datafusion.
Related Issues (20)
- Register SQL planners in `SessionState::new()` HOT 4
- Implement user defined planner for `date_part`
- Implement user defined planner for `create_struct` HOT 1
- Implement user defined planner for `create_named_struct` HOT 1
- Implement user defined planner for `sql_overlay_to_expr` HOT 1
- BinaryOp supporting multiple parameters in Substrait
- Support `COUNT()` in addition to `COUNT(*)` HOT 1
- Replace `println!` with `assert!` if possible in DataFusion examples HOT 3
- Implement Substrait support for SubqueryType::Scalar
- HashJoin for nested types give wrong results
- Clean Up Data Page Statistics Tests and Fix Bug HOT 1
- Implement user defined planner for sql_position_to_expr
- Implement user defined planner for `sql_compound_identifier_to_expr`
- Implement user defined planner for `sql_substring_to_expr `
- Implement user defined planner for `sql_position_to_expr`
- `where` clause incorrectly reject `NULL` literal (by SQLancer-NoREC)
- Make error message better when `bitwise_*` operator takes wrong argument type
- Improve error message for wrong argument type in operators
- Error evaluating clause `where COL_BIGINT < 1e100` (Found by SQLancer-NoREC) HOT 1
- `CASE` with `NULL` branch does not coerce when passed to aggregate function
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.