Comments (6)
From recent findings, we can skip the push down filters step, since the filters needed are already present in OTreeIndex
matchingFiles
method
A result from doing:
val df = spark.read.format("qbeast").load("/tmp/qbeast_table")
df.filter("user_id > 537764969").explain(true)
Shows the user_id
filter as part of the DataFilters
on the last step:
== Physical Plan ==
*(1) Filter (isnotnull(user_id#1762) AND (user_id#1762 >= 537764969))
+- *(1) ColumnarToRow
+- FileScan parquet [event_time#1755,event_type#1756,product_id#1757,category_id#1758L,category_code#1759,brand#1760,price#1761,user_id#1762,user_session#1763] Batched: true, ...
DataFilters: [isnotnull(user_id#1762), (user_id#1762 >= 537764969)],...
Format: Parquet, Location: OTreeIndex[file:/tmp/qb-testing6614606061063411331], PartitionFilters: [], PushedFilters: [IsNotNull(user_id), GreaterThanOrEqual(user_id,537764969)], ReadSchema: struct<event_time:string,event_type:string,product_id:int,category_id:bigint,category_code:string...
from qbeast-spark.
Just curiosity, what will be in the DataFilters collection if the original filter uses OR instead of AND?
from qbeast-spark.
Good question! My guess is that they would not appear in DataFilters, but I will check it.
from qbeast-spark.
They are all present as a single Expression:
DataFilters: [(((user_id#1762 >= 537764969) OR ((user_id#1762 < 666666666) AND (product_id#1757 >= 6789009)))
from qbeast-spark.
So if we want a precise filtering we still need to work with AST, right?
from qbeast-spark.
Correct. For now, I think we should work only with conjunctions. There are functions in Spark that we can reproduce for splitting predicates, as Delta and other partition-aware formats do.
But maybe @cugni has other hints
Edited: In fact, for a query with only conjunctive predicates, Spark itself already separates them in different Expressions.
from qbeast-spark.
Related Issues (20)
- QbeastOptions should follow the Builder Pattern
- Empty DataFrame save should mimic Delta Lake behaviour
- Update Documentation for 0.6.0 release HOT 2
- Add method to get the Minimum Bounding Cube
- Optimization should not introduce data change
- Remove redundant classes and methods
- Incorrect Rollup cube element counts HOT 1
- Overhead during optimization
- Metadata time in queries with Qbeast Datasource is higher than expected
- Add Commit Hooks to write extra information within the same transaction HOT 2
- Make Blocks addressable from the file reader
- QbeastOptions.toMap should return CaseInsensitiveMap
- Change build version to 0.7.0
- Unable to overwrite a delta table HOT 3
- Analyse the impact of Delete operation in Qbeast Index
- Review and update documentation for Troubleshooting
- Add utility method to calculate the histogram
- Large Task Deserialization Time during Optimization
- Analyze Histogram Transformation for outliers HOT 4
- Remove .compact() operation and discuss interaction between optimize and replication
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 qbeast-spark.