Comments (5)
Hi @alamb, I am wondering whether is there a way to implement the cube
and 'rollup' functions easily. the inner vector is expanded in the planner.
from arrow-datafusion.
Hi @xinlifoobar - another thing that we could potentially do is to work at this from the SQL statement level (rather than the Expr level)
As in implement a round trip test like this for a query with a grouping set:
https://github.com/apache/datafusion/blob/main/datafusion/sql/tests/sql_integration.rs#L4678-L4708
from arrow-datafusion.
I think from the Vec<Expr>
could not mapping back to the only unique Vec<Vec<Expr>>
and hence unparse the cube statement would be difficult. How about store another copy of origin Vec in the Cube and Rollup instance? i.e.,
pub enum GroupingSet {
/// Rollup grouping sets
Rollup(Vec<Expr>, Vec<Vec<Expr>>),
/// Cube grouping sets
Cube(Vec<Expr>, Vec<Vec<Expr>>),
/// User-defined grouping sets
GroupingSets(Vec<Vec<Expr>>),
}
from arrow-datafusion.
I made a mistake about the previous statements. The vector of cube and rollout is not expanded so the implement could be easy.
https://github.com/apache/datafusion/blob/main/datafusion/sql/src/expr/grouping_set.rs#L42-L81
from arrow-datafusion.
Thanks again @xinlifoobar
from arrow-datafusion.
Related Issues (20)
- Dynamic schema for custom TableProvider HOT 3
- ScalarValue serialization does not handle nested dictionary values
- Using `Expr::field` panics HOT 3
- Improve signature of `get_field` is function
- UserDefinedLogicalNode::from_template does not return a Result<...> >
- UserDefindedLogicalNode::from_template does not return a Result<...>. HOT 3
- Row groups are read out of order or with completely different values HOT 4
- DataFusion weekly project plan (Andrew Lamb) - May 20, 2024 HOT 1
- Advanced example for building an external index for Row Groups *within* parquet files
- DataFusion HashJoin LeftAnti doesn't support null aware anti join
- Incorrect statistics read for `i8` `i16` columns in parquet HOT 3
- DataFusion ignores "column order" parquet statistics specification
- DataFusion reads Date32 and Date64 parquet statistics in as Int32Array HOT 2
- Pass per-field BigQuery `OPTIONS` values to the LogicalPlan's Arrow Schema
- Expand Test Coverage for ScalarUDF's
- Make the configuration for `StreamTable` more generic to support more stream sources
- Support `date_bin` on timestamps with timezone, properly accounting for Daylight Savings Time HOT 14
- Incorrect statistics read for unsigned integer columns in parquet HOT 1
- Incorrect statistics read for binary columns in parquet
- Implement a benchmark for extracting arrow statistics from parquet HOT 1
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.