spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takeshi Yamamuro (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-26868) Duplicate error message for implicit cartesian product in verbose explain
Date Thu, 14 Feb 2019 06:48:00 GMT

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

Takeshi Yamamuro commented on SPARK-26868:
------------------------------------------

Thanks, [~dongjoon]!

I just set that number cuz I used the version v2.4.0.

> 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


Mime
View raw message