[ https://issues.apache.org/jira/browse/SPARK-37382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17447280#comment-17447280 ]
caican commented on SPARK-37382: -------------------------------- [~victor-wong] Does the images display nomally now? > `with as` clause got inconsistent results > ----------------------------------------- > > Key: SPARK-37382 > URL: https://issues.apache.org/jira/browse/SPARK-37382 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.1.2 > Reporter: caican > Priority: Major > Attachments: spark2.3.png, spark3.1.png > > > In Spark3.1, the `with as` clause in the same SQL is executed multiple times, > got different results > ` > with tab as ( > select 'Withas' as name, rand() as rand_number > ) > select name, rand_number > from tab > union all > select name, rand_number > from tab > ` > !spark3.1.png! > But In spark2.3, it got consistent results > ` > with tab as ( > select 'Withas' as name, rand() as rand_number > ) > select name, rand_number > from tab > union all > select name, rand_number > from tab > ` > !spark2.3.png! > Why does Spark3.1.2 return different results? > Has anyone encountered this problem? -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org