[ https://issues.apache.org/jira/browse/SPARK-36444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17394641#comment-17394641 ]
Yuming Wang commented on SPARK-36444: ------------------------------------- Another case: {code:scala} sql("create table t1 using parquet partitioned by (part) as select id, cast(cast(cast(id as timestamp) as date) as string) as part from range(10000000)") sql("create table t2 using parquet as select 1 as id, cast(cast(1L as timestamp) as date) as p") // sql("ANALYZE TABLES in default COMPUTE STATISTICS") sql("select * from t1 join (select id, cast(t2.p as string) as newP from t2 where t2.id > -1) on t1.part = newP ").explain {code} > Remove OptimizeSubqueries from batch of PartitionPruning > -------------------------------------------------------- > > Key: SPARK-36444 > URL: https://issues.apache.org/jira/browse/SPARK-36444 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 3.3.0 > Reporter: Yuming Wang > Priority: Major > > To support this case: > {code:scala} > sql( > """ > |SELECT date_id, product_id FROM fact_sk f > |JOIN (select store_id + 3 as new_store_id from dim_store where > country = 'US') s > |ON f.store_id = s.new_store_id > """.stripMargin) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org