TongWei1105 commented on code in PR #41513:
URL: https://github.com/apache/spark/pull/41513#discussion_r1223875547


##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala:
##########
@@ -4683,6 +4683,27 @@ class SQLQuerySuite extends QueryTest with 
SharedSparkSession with AdaptiveSpark
     ).observe("my_event", count("*"))
     df1.crossJoin(df1)
   }
+
+  test("SPARK-44007: Unresolved hint cause query failure") {
+    withTable("t0", "t1") {
+      sql("CREATE TABLE t0(c0 bigint) USING PARQUET")
+      sql("CREATE TABLE t1(c1 bigint) USING PARQUET")
+      sql(
+        """
+          |WITH
+          |w0 AS (SELECT * FROM t0),
+          |w1 AS (SELECT * FROM w0 group by c0),
+          |w2 AS (SELECT /*+ userHint(t1) */ c1 FROM t1 ),
+          |w3 AS (
+          |SELECT w2.c1, w0.c0, w1.c0
+          |FROM w2
+          |JOIN w0 on w2.c1 = w0.c0
+          |JOIN w1 on w2.c1 = w1.c0
+          |)
+          |SELECT * FROM w3;
+          |""".stripMargin)
+    }
+  }

Review Comment:
   Indeed, I will close this issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to