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

Davies Liu commented on SPARK-9482:
-----------------------------------

The Physical plan looks very strange, it use unsafe BroadcastHashOuterJoin and 
BroadcastLeftSemiJoinHash, but use safe Projection (which should be 
TungstenProjection). I tried locally, it does use TungstenProject.

Is it possible that conf.unsafeEnabled is flaky? (changed by some tests)

> flaky test: 
> org.apache.spark.sql.hive.execution.HiveCompatibilitySuite.semijoin
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-9482
>                 URL: https://issues.apache.org/jira/browse/SPARK-9482
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.0
>            Reporter: Xiangrui Meng
>            Assignee: Yin Huai
>            Priority: Blocker
>              Labels: flaky-test
>
> https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/39059/testReport/org.apache.spark.sql.hive.execution/HiveCompatibilitySuite/semijoin/
> {code}
> Regression
> org.apache.spark.sql.hive.execution.HiveCompatibilitySuite.semijoin
> Failing for the past 1 build (Since Failed#39059 )
> Took 7.7 sec.
> Error Message
>  Results do not match for semijoin: == Parsed Logical Plan == 'Sort ['a.key 
> ASC], false  'Project [unresolvedalias('a.key)]   'Join RightOuter, 
> Some(('a.key = 'c.key))    'Join LeftSemi, Some(('a.key = 'b.key))     
> 'UnresolvedRelation [t3], Some(a)     'UnresolvedRelation [t2], Some(b)    
> 'UnresolvedRelation [t1], Some(c)  == Analyzed Logical Plan == key: int Sort 
> [key#176228 ASC], false  Project [key#176228]   Join RightOuter, 
> Some((key#176228 = key#176232))    Join LeftSemi, Some((key#176228 = 
> key#176230))     MetastoreRelation default, t3, Some(a)     MetastoreRelation 
> default, t2, Some(b)    MetastoreRelation default, t1, Some(c)  == Optimized 
> Logical Plan == Sort [key#176228 ASC], false  Project [key#176228]   Join 
> RightOuter, Some((key#176228 = key#176232))    Project [key#176228]     Join 
> LeftSemi, Some((key#176228 = key#176230))      Project [key#176228]       
> MetastoreRelation default, t3, Some(a)      Project [key#176230]       
> MetastoreRelation default, t2, Some(b)    Project [key#176232]     
> MetastoreRelation default, t1, Some(c)  == Physical Plan == ExternalSort 
> [key#176228 ASC], false  Project [key#176228]   ConvertToSafe    
> BroadcastHashOuterJoin [key#176228], [key#176232], RightOuter, None     
> ConvertToUnsafe      Project [key#176228]       ConvertToSafe        
> BroadcastLeftSemiJoinHash [key#176228], [key#176230], None         
> ConvertToUnsafe          HiveTableScan [key#176228], (MetastoreRelation 
> default, t3, Some(a))         ConvertToUnsafe          HiveTableScan 
> [key#176230], (MetastoreRelation default, t2, Some(b))     ConvertToUnsafe    
>   HiveTableScan [key#176232], (MetastoreRelation default, t1, Some(c))  Code 
> Generation: true == RDD == key !== HIVE - 31 row(s) ==   == CATALYST - 30 
> row(s) ==  0                        0  0                        0  0          
>               0  0                        0  0                        0  0    
>                     0  0                        0  0                        0 
>  0                        0  0                        0  0                    
>     0  0                        0  0                        0  0              
>           0  0                        0  0                        0  0        
>                 0  0                        0  10                       10  
> 10                       10  10                       10  10                  
>      10 !4                        8 !4                        8 !8            
>             NULL !8                        NULL  NULL                     
> NULL  NULL                     NULL  NULL                     NULL  NULL      
>                NULL !NULL                                      
> Stacktrace
> sbt.ForkMain$ForkError: 
> Results do not match for semijoin:
> == Parsed Logical Plan ==
> 'Sort ['a.key ASC], false
>  'Project [unresolvedalias('a.key)]
>   'Join RightOuter, Some(('a.key = 'c.key))
>    'Join LeftSemi, Some(('a.key = 'b.key))
>     'UnresolvedRelation [t3], Some(a)
>     'UnresolvedRelation [t2], Some(b)
>    'UnresolvedRelation [t1], Some(c)
> == Analyzed Logical Plan ==
> key: int
> Sort [key#176228 ASC], false
>  Project [key#176228]
>   Join RightOuter, Some((key#176228 = key#176232))
>    Join LeftSemi, Some((key#176228 = key#176230))
>     MetastoreRelation default, t3, Some(a)
>     MetastoreRelation default, t2, Some(b)
>    MetastoreRelation default, t1, Some(c)
> == Optimized Logical Plan ==
> Sort [key#176228 ASC], false
>  Project [key#176228]
>   Join RightOuter, Some((key#176228 = key#176232))
>    Project [key#176228]
>     Join LeftSemi, Some((key#176228 = key#176230))
>      Project [key#176228]
>       MetastoreRelation default, t3, Some(a)
>      Project [key#176230]
>       MetastoreRelation default, t2, Some(b)
>    Project [key#176232]
>     MetastoreRelation default, t1, Some(c)
> == Physical Plan ==
> ExternalSort [key#176228 ASC], false
>  Project [key#176228]
>   ConvertToSafe
>    BroadcastHashOuterJoin [key#176228], [key#176232], RightOuter, None
>     ConvertToUnsafe
>      Project [key#176228]
>       ConvertToSafe
>        BroadcastLeftSemiJoinHash [key#176228], [key#176230], None
>         ConvertToUnsafe
>          HiveTableScan [key#176228], (MetastoreRelation default, t3, Some(a))
>         ConvertToUnsafe
>          HiveTableScan [key#176230], (MetastoreRelation default, t2, Some(b))
>     ConvertToUnsafe
>      HiveTableScan [key#176232], (MetastoreRelation default, t1, Some(c))
> Code Generation: true
> == RDD ==
> key
> !== HIVE - 31 row(s) ==   == CATALYST - 30 row(s) ==
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  0                        0
>  10                       10
>  10                       10
>  10                       10
>  10                       10
> !4                        8
> !4                        8
> !8                        NULL
> !8                        NULL
>  NULL                     NULL
>  NULL                     NULL
>  NULL                     NULL
>  NULL                     NULL
> !NULL                     
>                 
>       at 
> org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:495)
>       at 
> org.scalatest.FunSuite.newAssertionFailedException(FunSuite.scala:1555)
>       at org.scalatest.Assertions$class.fail(Assertions.scala:1328)
>       at org.scalatest.FunSuite.fail(FunSuite.scala:1555)
>       at 
> org.apache.spark.sql.hive.execution.HiveComparisonTest$$anonfun$createQueryTest$1$$anonfun$apply$mcV$sp$6.apply(HiveComparisonTest.scala:397)
>       at 
> org.apache.spark.sql.hive.execution.HiveComparisonTest$$anonfun$createQueryTest$1$$anonfun$apply$mcV$sp$6.apply(HiveComparisonTest.scala:368)
>       at 
> scala.runtime.Tuple3Zipped$$anonfun$foreach$extension$1.apply(Tuple3Zipped.scala:109)
>       at 
> scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
>       at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:34)
>       at scala.runtime.Tuple3Zipped$.foreach$extension(Tuple3Zipped.scala:107)
>       at 
> org.apache.spark.sql.hive.execution.HiveComparisonTest$$anonfun$createQueryTest$1.apply$mcV$sp(HiveComparisonTest.scala:368)
>       at 
> org.apache.spark.sql.hive.execution.HiveComparisonTest$$anonfun$createQueryTest$1.apply(HiveComparisonTest.scala:238)
>       at 
> org.apache.spark.sql.hive.execution.HiveComparisonTest$$anonfun$createQueryTest$1.apply(HiveComparisonTest.scala:238)
>       at 
> org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
>       at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
>       at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
>       at org.scalatest.Transformer.apply(Transformer.scala:22)
>       at org.scalatest.Transformer.apply(Transformer.scala:20)
>       at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166)
>       at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:42)
>       at 
> org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163)
>       at 
> org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
>       at 
> org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
>       at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
>       at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175)
>       at 
> org.apache.spark.sql.hive.execution.HiveCompatibilitySuite.org$scalatest$BeforeAndAfter$$super$runTest(HiveCompatibilitySuite.scala:31)
>       at org.scalatest.BeforeAndAfter$class.runTest(BeforeAndAfter.scala:200)
>       at 
> org.apache.spark.sql.hive.execution.HiveCompatibilitySuite.runTest(HiveCompatibilitySuite.scala:31)
>       at 
> org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
>       at 
> org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
>       at 
> org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413)
>       at 
> org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401)
>       at scala.collection.immutable.List.foreach(List.scala:318)
>       at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
>       at 
> org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396)
>       at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483)
>       at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208)
>       at org.scalatest.FunSuite.runTests(FunSuite.scala:1555)
>       at org.scalatest.Suite$class.run(Suite.scala:1424)
>       at 
> org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555)
>       at 
> org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
>       at 
> org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
>       at org.scalatest.SuperEngine.runImpl(Engine.scala:545)
>       at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212)
>       at 
> org.apache.spark.sql.hive.execution.HiveComparisonTest.org$scalatest$BeforeAndAfterAll$$super$run(HiveComparisonTest.scala:42)
>       at 
> org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257)
>       at 
> org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256)
>       at 
> org.apache.spark.sql.hive.execution.HiveCompatibilitySuite.org$scalatest$BeforeAndAfter$$super$run(HiveCompatibilitySuite.scala:31)
>       at org.scalatest.BeforeAndAfter$class.run(BeforeAndAfter.scala:241)
>       at 
> org.apache.spark.sql.hive.execution.HiveCompatibilitySuite.run(HiveCompatibilitySuite.scala:31)
>       at 
> org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:462)
>       at 
> org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:671)
>       at sbt.ForkMain$Run$2.call(ForkMain.java:294)
>       at sbt.ForkMain$Run$2.call(ForkMain.java:284)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>       at java.lang.Thread.run(Thread.java:745)
> {code}



--
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