[ https://issues.apache.org/jira/browse/SPARK-24870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16550131#comment-16550131 ]
Apache Spark commented on SPARK-24870: -------------------------------------- User 'eatoncys' has created a pull request for this issue: https://github.com/apache/spark/pull/21823 > Cache can't work normally if there are case letters in SQL > ---------------------------------------------------------- > > Key: SPARK-24870 > URL: https://issues.apache.org/jira/browse/SPARK-24870 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.3.1 > Reporter: eaton > Priority: Major > > Cache can't work normally if there are case letters in SQL, > for example: > sql("CREATE TABLE IF NOT EXISTS src (key INT, value STRING) USING hive") > sql("select key, sum(case when Key > 0 then 1 else 0 end) as positiveNum " + > "from src group by key").cache().createOrReplaceTempView("src_cache") > sql( > s"""select a.key > from > (select key from src_cache where positiveNum = 1)a > left join > (select key from src_cache )b > on a.key=b.key > """).explain > > The subquery "select key from src_cache where positiveNum = 1" on the left of > join can use the cache data, but the subquery "select key from src_cache" on > the right of join cannot use the cache data. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org