Comments (5)
Merged in #67
from qbeast-spark.
Right now we throw an exception for this, but for further enhancement #3 we should investigate how to deal with null values on columns (when schema evolution happens and a new column is added, the old files would have null values for that column)
from qbeast-spark.
At the moment the columns which are not indexed can have null values. The reason is that indexed columns must not have null values right now, and OTreeAlgorithm prefer to use non-nullable columns to calculate the hash. This should be tested again when we implement null value support for the indexed columns.
from qbeast-spark.
Some random thoughts on possible solution.
The idea is represent the NULL values with some special numerical values to let the indexing work as in case of non null values. Space revision should help to avoid collision between the user defined values and special values.
When a space revision is created we fix the boundaries for the data coordinates. If later new data violates the boundaries then we create a new space revision. As soon as a space revision is created we can define a linear transformation which maps the data into a space like [0 + eps, 1]^n, where n is the number of dimensions (currently we map into the space [0,1]^n). Then null coordinate values can be represented by 0. The indexing can be done as we do it now.
The next challenge is to handle the queries correctly. As soon as we have cubes containing the query results we should filter out those elements which does not satisfy where clause because of null values. I hope it is not a problem for Spark, after all indexes are unlikely to return the correct data, they are likely to return some small superset of data, so I expect that all the elements retrieved from the index blocks will be tested to satify the query.
@osopardo1 @cugni what do you think? Thanks.
from qbeast-spark.
First, indeed, we don't care so much about those null values for schema evolution. Since we will be working with different space revisions, the null values of the new columns do not affect older versions.
Then, for the normal datasets with null values, I think you are right. We can treat them with 0.
Yes, on Spark, all elements retrieved from index blocks will be filtered again on memory to satisfy the where clause.
from qbeast-spark.
Related Issues (20)
- "SET TBLPROPERTIES" does not persist changes in the _delta_log
- ConvertToQbeast not working with paths containing '.'
- Parallelize metadata processing and reduce metadata footprint HOT 2
- SamplingListFilesStrategy should only log in DEBUG mode
- Changing cubeSize should not create a new Revision
- Optimization causes erroneous cube maxWeights HOT 1
- Add more examples to the Getting Started
- Add metastores documentation
- Add method to retrieve Revision Information HOT 1
- Using different hash seed for each revision
- Error on sampling when using <columnName>:<type> in columnsToIndex
- Unify Table Properties structure and storage location
- Add QbeastTable.forTable method
- Update CONTRIBUTING.md HOT 1
- Update README with links to the documentation HOT 1
- Add documentation about the Release process HOT 1
- Update some markdown files of Qbeast-spark repository
- Broken link in main README HOT 1
- TBLPROPERTIES not updated on Spark Catalog
- TBLPROPERTIES on new table are saved partially
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.