Skip to content

Commit

Permalink
Revert "[SPARK-33861][SQL] Simplify conditional in predicate"
Browse files Browse the repository at this point in the history
This reverts commit 32d4a2b and 3aa4e11.

Closes apache#37729 from wangyum/SPARK-33861.

Authored-by: Yuming Wang <yumwang@ebay.com>
Signed-off-by: Yuming Wang <yumwang@ebay.com>
(cherry picked from commit 43cbdc6)
Signed-off-by: Yuming Wang <yumwang@ebay.com>
  • Loading branch information
wangyum committed Sep 3, 2022
1 parent 58375a8 commit efe12ae
Show file tree
Hide file tree
Showing 54 changed files with 343 additions and 665 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ abstract class Optimizer(catalogManager: CatalogManager)
RemoveDispensableExpressions,
SimplifyBinaryComparison,
ReplaceNullWithFalseInPredicate,
SimplifyConditionalsInPredicate,
PruneFilters,
SimplifyCasts,
SimplifyCaseConversionExpressions,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ object RuleIdCollection {
"org.apache.spark.sql.catalyst.optimizer.SimplifyCaseConversionExpressions" ::
"org.apache.spark.sql.catalyst.optimizer.SimplifyCasts" ::
"org.apache.spark.sql.catalyst.optimizer.SimplifyConditionals" ::
"org.apache.spark.sql.catalyst.optimizer.SimplifyConditionalsInPredicate" ::
"org.apache.spark.sql.catalyst.optimizer.SimplifyExtractValueOps" ::
"org.apache.spark.sql.catalyst.optimizer.TransposeWindow" ::
"org.apache.spark.sql.catalyst.optimizer.UnwrapCastInBinaryComparison" :: Nil
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ Input [5]: [ss_customer_sk#1, ss_hdemo_sk#2, ss_store_sk#3, ss_ticket_number#4,
Output [4]: [hd_demo_sk#10, hd_buy_potential#11, hd_dep_count#12, hd_vehicle_count#13]
Batched: true
Location [not included in comparison]/{warehouse_dir}/household_demographics]
PushedFilters: [IsNotNull(hd_vehicle_count), IsNotNull(hd_dep_count), Or(EqualTo(hd_buy_potential,>10000 ),EqualTo(hd_buy_potential,Unknown )), GreaterThan(hd_vehicle_count,0), IsNotNull(hd_demo_sk)]
PushedFilters: [IsNotNull(hd_vehicle_count), Or(EqualTo(hd_buy_potential,>10000 ),EqualTo(hd_buy_potential,Unknown )), GreaterThan(hd_vehicle_count,0), IsNotNull(hd_demo_sk)]
ReadSchema: struct<hd_demo_sk:int,hd_buy_potential:string,hd_dep_count:int,hd_vehicle_count:int>

(15) ColumnarToRow [codegen id : 3]
Input [4]: [hd_demo_sk#10, hd_buy_potential#11, hd_dep_count#12, hd_vehicle_count#13]

(16) Filter [codegen id : 3]
Input [4]: [hd_demo_sk#10, hd_buy_potential#11, hd_dep_count#12, hd_vehicle_count#13]
Condition : (((((isnotnull(hd_vehicle_count#13) AND isnotnull(hd_dep_count#12)) AND ((hd_buy_potential#11 = >10000 ) OR (hd_buy_potential#11 = Unknown ))) AND (hd_vehicle_count#13 > 0)) AND ((cast(hd_dep_count#12 as double) / cast(hd_vehicle_count#13 as double)) > 1.2)) AND isnotnull(hd_demo_sk#10))
Condition : ((((isnotnull(hd_vehicle_count#13) AND ((hd_buy_potential#11 = >10000 ) OR (hd_buy_potential#11 = Unknown ))) AND (hd_vehicle_count#13 > 0)) AND CASE WHEN (hd_vehicle_count#13 > 0) THEN ((cast(hd_dep_count#12 as double) / cast(hd_vehicle_count#13 as double)) > 1.2) END) AND isnotnull(hd_demo_sk#10))

(17) Project [codegen id : 3]
Output [1]: [hd_demo_sk#10]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ WholeStageCodegen (10)
BroadcastExchange #6
WholeStageCodegen (3)
Project [hd_demo_sk]
Filter [hd_vehicle_count,hd_dep_count,hd_buy_potential,hd_demo_sk]
Filter [hd_vehicle_count,hd_buy_potential,hd_dep_count,hd_demo_sk]
ColumnarToRow
InputAdapter
Scan parquet default.household_demographics [hd_demo_sk,hd_buy_potential,hd_dep_count,hd_vehicle_count]
Expand Down
Loading

0 comments on commit efe12ae

Please sign in to comment.