You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "nivedita singh (JIRA)" <ji...@apache.org> on 2019/03/07 04:20:00 UTC

[jira] [Commented] (SPARK-26868) Duplicate error message for implicit cartesian product in verbose explain

    [ https://issues.apache.org/jira/browse/SPARK-26868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16786362#comment-16786362 ] 

nivedita singh commented on SPARK-26868:
----------------------------------------

If no one is working on it, can I work on this?

> Duplicate error message for implicit cartesian product in verbose explain
> -------------------------------------------------------------------------
>
>                 Key: SPARK-26868
>                 URL: https://issues.apache.org/jira/browse/SPARK-26868
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Takeshi Yamamuro
>            Priority: Trivial
>
> Super trivial though, I just report this just in case (I think it would be nice if we could print this error message in a cleaner way):
> {code:java}
> scala> Seq(1).toDF("id").write.saveAsTable("t1")
> scala> Seq(1).toDF("id").write.saveAsTable("t2")
> scala> sql("SELECT * FROM t1 JOIN t2").explain(true)
> == Parsed Logical Plan ==
> 'Project [*]
> +- 'Join Inner
>    :- 'UnresolvedRelation `t1`
>    +- 'UnresolvedRelation `t2`
> == Analyzed Logical Plan ==
> id: int, id: int
> Project [id#14, id#15]
> +- Join Inner
>    :- SubqueryAlias `default`.`t1`
>    :  +- Relation[id#14] parquet
>    +- SubqueryAlias `default`.`t2`
>       +- Relation[id#15] parquet
> == Optimized Logical Plan ==
> org.apache.spark.sql.AnalysisException: Detected implicit cartesian product for INNER join between logical plans
> Relation[id#14] parquet
> and
> Relation[id#15] parquet
> Join condition is missing or trivial.
> Either: use the CROSS JOIN syntax to allow cartesian products between these
> relations, or: enable implicit cartesian products by setting the configuration
> variable spark.sql.crossJoin.enabled=true;
> == Physical Plan ==
> org.apache.spark.sql.AnalysisException: Detected implicit cartesian product for INNER join between logical plans
> Relation[id#14] parquet
> and
> Relation[id#15] parquet
> Join condition is missing or trivial.
> Either: use the CROSS JOIN syntax to allow cartesian products between these
> relations, or: enable implicit cartesian products by setting the configuration
> variable spark.sql.crossJoin.enabled=true;
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org