[ https://issues.apache.org/jira/browse/SPARK-38266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17495286#comment-17495286 ]
Apache Spark commented on SPARK-38266: -------------------------------------- User 'Ngone51' has created a pull request for this issue: https://github.com/apache/spark/pull/35568 > UnresolvedException: Invalid call to dataType on unresolved object caused by > GetDateFieldOperations > --------------------------------------------------------------------------------------------------- > > Key: SPARK-38266 > URL: https://issues.apache.org/jira/browse/SPARK-38266 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.3.0, 3.2 > Reporter: wuyi > Assignee: wuyi > Priority: Major > > {code:java} > test("GetDateFieldOperations should skip unresolved nodes") { > withSQLConf(SQLConf.ANSI_ENABLED.key -> "true") { > val df = Seq("1644821603").map(i => (i.toInt, i)).toDF("tsInt", "tsStr") > val df1 = df.select(df("tsStr").cast("timestamp")).as("df1") > val df2 = df.select(df("tsStr").cast("timestamp")).as("df2") > df1.join(df2, $"df1.tsStr" === $"df2.tsStr", "left_outer") > val df3 = df1.join(df2, $"df1.tsStr" === $"df2.tsStr", "left_outer") > .select($"df1.tsStr".as("timeStr")).as("df3") > // This throws "UnresolvedException: Invalid call to > // dataType on unresolved object" instead of "AnalysisException: Column > 'df1.timeStr' does not exist." > df3.join(df1, year($"df1.timeStr") === year($"df3.tsStr")) > } > } {code} -- 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