Comments (6)
CC: @sezruby
from hyperspace.
CC: @imback82
from hyperspace.
I think this should have been fixed by apache/spark#26943 in Spark 3.0, and I don't think it's worthwhile to update the rule to support this scenario for Spark 2.4.
For the following:
spark.conf.set("spark.sql.autoBroadcastJoinThreshold", "-1")
val df1 = (0 until 100).map(i => (i % 5, i % 11)).toDF("i1", "j1")
val df2 = (0 until 100).map(i => (i % 7, i % 11)).toDF("i2", "j2")
df1.write.format("parquet").bucketBy(8, "i1").saveAsTable("t1")
df2.write.format("parquet").bucketBy(8, "i2").saveAsTable("t2")
sql("SELECT t1.i1, t2Temp.aliasC FROM t1 INNER JOIN (SELECT i2 as aliasC from t2) as t2Temp WHERE t1.i1 = t2Temp.aliasC").explain
Spark 2.4.5 outputs:
== Physical Plan ==
*(5) SortMergeJoin [i1#31], [aliasC#37], Inner
:- *(2) Sort [i1#31 ASC NULLS FIRST], false, 0
: +- Exchange hashpartitioning(i1#31, 200)
: +- *(1) Project [i1#31]
: +- *(1) Filter isnotnull(i1#31)
: +- *(1) FileScan parquet default.t1[i1#31] Batched: true, Format: Parquet, Location: InMemoryFileIndex[file:...], PartitionFilters: [], PushedFilters: [IsNotNull(i1)], ReadSchema: struct<i1:int>, SelectedBucketsCount: 8 out of 8
+- *(4) Sort [aliasC#37 ASC NULLS FIRST], false, 0
+- Exchange hashpartitioning(aliasC#37, 200)
+- *(3) Project [i2#33 AS aliasC#37]
+- *(3) Filter isnotnull(i2#33)
+- *(3) FileScan parquet default.t2[i2#33] Batched: true, Format: Parquet, Location: InMemoryFileIndex[file:...], PartitionFilters: [], PushedFilters: [IsNotNull(i2)], ReadSchema: struct<i2:int>, SelectedBucketsCount: 8 out of 8
whereas Spark 3.0 prints:
== Physical Plan ==
*(3) SortMergeJoin [i1#27], [aliasC#33], Inner
:- *(1) Sort [i1#27 ASC NULLS FIRST], false, 0
: +- *(1) Project [i1#27]
: +- *(1) Filter isnotnull(i1#27)
: +- *(1) ColumnarToRow
: +- FileScan parquet default.t1[i1#27] Batched: true, DataFilters: [isnotnull(i1#27)], Format: Parquet, Location: InMemoryFileIndex[file:...], PartitionFilters: [], PushedFilters: [IsNotNull(i1)], ReadSchema: struct<i1:int>, SelectedBucketsCount: 8 out of 8
+- *(2) Sort [aliasC#33 ASC NULLS FIRST], false, 0
+- *(2) Project [i2#29 AS aliasC#33]
+- *(2) Filter isnotnull(i2#29)
+- *(2) ColumnarToRow
+- FileScan parquet default.t2[i2#29] Batched: true, DataFilters: [isnotnull(i2#29)], Format: Parquet, Location: InMemoryFileIndex[file:...], PartitionFilters: [], PushedFilters: [IsNotNull(i2)], ReadSchema: struct<i2:int>, SelectedBucketsCount: 8 out of 8
from hyperspace.
Great thanks! I'm closing this issue.
from hyperspace.
@apoorvedave1 Can you confirm if this is not needed in the join rule? I see that we clean up the aliases, so matching should be ok, right?
from hyperspace.
yes this looks like a solved issue now. Thanks for checking @imback82
from hyperspace.
Related Issues (20)
- [FEATURE REQUEST]: Update azure-pipelines.yml to build on Windows HOT 3
- Enforce/check scalafmt during build/CI
- Deprecate IndexConfig in favor of type-specific configs
- input_file_name() results change after Hyperspace is enabled HOT 1
- Spark 3.1 on Windows build test issue
- [FEATURE REQUEST]: Create helper function to check whether index is actually used in the plan HOT 1
- Notice user that indexes are not applied because indexed data protocols are different.
- Failed to debug Scala Test in IntelliJ HOT 1
- [FEATURE REQUEST]: Enable hyperspace with SparkSessionExtention
- Create a trait for shared functions across tests
- [PROPOSAL]: support not implementation of delta lake or some other physical manifestation, but V2 data source of Spark HOT 1
- [FEATURE REQUEST]: Please consider extending indexing support to non - spark implementation of structured storage, specifically, stand - alone Java and Rust implementation of Parquet / Delta Lake
- [PROPOSAL]: ZOrderCoveringIndex
- Unable to use hyperspace on databricks runtime 8.4 (spark 3.1.2 scale 2.12) HOT 3
- Is index recommender / what-If API available?
- Z-Ordering index unavailable in Spark 2.x HOT 2
- [FEATURE REQUEST]: Integration with Presto/Trino query engine
- MinMax analysis util throws exception on large dataset HOT 1
- [FEATURE REQUEST]: Hypserspace support for Hudi dataformat
- Is Project HyperSpace Deprecated? HOT 2
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 hyperspace.