Github user yhuai commented on the issue: https://github.com/apache/spark/pull/17666 @maropu Sorry. I think this PR introduces a regression. ``` scala> spark.sql("select * from range(1, 10) cross join range(1, 10)").explain == Physical Plan == org.apache.spark.sql.AnalysisException: Detected cartesian product for INNER join between logical plans Range (1, 10, step=1, splits=None) and Range (1, 10, step=1, splits=None) Join condition is missing or trivial. Use the CROSS JOIN syntax to allow cartesian products between these relations.; ``` I think we are taking the cross as the alias. I reverted your change locally and the query worked. I am attaching the expected analyzed plan below. ``` scala> spark.sql("select * from range(1, 10) cross join range(1, 10)").queryExecution.analyzed res1: org.apache.spark.sql.catalyst.plans.logical.LogicalPlan = Project [id#8L, id#9L] +- Join Cross :- Range (1, 10, step=1, splits=None) +- Range (1, 10, step=1, splits=None) ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org