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

Steve Loughran commented on SPARK-6433:
---------------------------------------

They have diverged, the original sql one has added a new method. Switching hive 
tests to that version is going to pick up this new method, but eliminate the 
divergence problem/maintenance work in future

{code}
diff 
./sql/hive/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala 
./sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/plans/PlanTest.scala
20,22d19
< import org.apache.spark.sql.catalyst.expressions.{Alias, AttributeReference, 
ExprId}
< import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
< import org.apache.spark.sql.catalyst.util._
24a22,25
> import org.apache.spark.sql.catalyst.expressions._
> import org.apache.spark.sql.catalyst.plans.logical.{NoRelation, Filter, 
> LogicalPlan}
> import org.apache.spark.sql.catalyst.util._
> 
26,29c27
<  * *** DUPLICATED FROM sql/catalyst/plans. ***
<  *
<  * It is hard to have maven allow one subproject depend on another 
subprojects test code.
<  * So, we duplicate this code here.
---
>  * Provides helper methods for comparing plans.
56a55,59
> 
>   /** Fails the test if the two expressions do not match */
>   protected def compareExpressions(e1: Expression, e2: Expression): Unit = {
>     comparePlans(Filter(e1, NoRelation), Filter(e2, NoRelation))
>   }
{code}

> hive tests to import spark-sql test JAR for QueryTest access
> ------------------------------------------------------------
>
>                 Key: SPARK-6433
>                 URL: https://issues.apache.org/jira/browse/SPARK-6433
>             Project: Spark
>          Issue Type: Improvement
>          Components: Build, SQL
>    Affects Versions: 1.4.0
>            Reporter: Steve Loughran
>            Priority: Minor
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> The hive module has its own clone of {{org.apache.spark.sql.QueryPlan}} and 
> {{org.apache.spark.sql.catalyst.plans.PlanTest}} which are copied from the 
> spark-sql module because it's "hard to have maven allow one subproject depend 
> on another subprojects test code"
> It's actually relatively straightforward
> # tell maven to build & publish the test JARs
> # import them in your other sub projects
> There is one consequence: the JARs will also end being published to mvn 
> central. This is not really a bad thing; it does help downstream projects 
> pick up the JARs too. It does become an issue if a test run depends on a 
> custom file under {{src/test/resources}} containing things like EC2 
> authentication keys, or even just log4.properties files which can interfere 
> with each other. These need to be excluded -the simplest way is to exclude 
> all of the resources from test JARs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to