[ https://issues.apache.org/jira/browse/SPARK-39354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17544914#comment-17544914 ]
Yuming Wang commented on SPARK-39354: ------------------------------------- Yes. It is only exception message related. > The analysis exception is incorrect > ----------------------------------- > > Key: SPARK-39354 > URL: https://issues.apache.org/jira/browse/SPARK-39354 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.3.0 > Reporter: Yuming Wang > Priority: Minor > > {noformat} > scala> spark.sql("create table t1(user_id int, auct_end_dt date) using > parquet;") > res0: org.apache.spark.sql.DataFrame = [] > scala> spark.sql("select * from t1 join t2 on t1.user_id = t2.user_id where > t1.auct_end_dt >= Date_sub('2020-12-27', 90)").show > org.apache.spark.sql.AnalysisException: cannot resolve > 'date_sub('2020-12-27', 90)' due to data type mismatch: argument 1 requires > date type, however, ''2020-12-27'' is of string type.; line 1 pos 76 > at > org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42) > at > org.apache.spark.sql.catalyst.analysis.RemoveTempResolvedColumn$.$anonfun$apply$82(Analyzer.scala:4334) > at > org.apache.spark.sql.catalyst.analysis.RemoveTempResolvedColumn$.$anonfun$apply$82$adapted(Analyzer.scala:4327) > at > org.apache.spark.sql.catalyst.trees.TreeNode.foreachUp(TreeNode.scala:365) > at > org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$foreachUp$1(TreeNode.scala:364) > at > org.apache.spark.sql.catalyst.trees.TreeNode.$anonfun$foreachUp$1$adapted(TreeNode.scala:364) > {noformat} > The analysis exception should be: > {noformat} > org.apache.spark.sql.AnalysisException: Table or view not found: t2 > {noformat} -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org