Skip to content
Snippets Groups Projects
Commit 90a1d8db authored by tedyu's avatar tedyu Committed by Cheng Lian
Browse files

[SPARK-12719][HOTFIX] Fix compilation against Scala 2.10

PR #11696 introduced a complex pattern match that broke Scala 2.10 match unreachability check and caused build failure.  This PR fixes this issue by expanding this pattern match into several simpler ones.

Note that tuning or turning off `-Dscalac.patmat.analysisBudget` doesn't work for this case.

Compilation against Scala 2.10

Author: tedyu <yuzhihong@gmail.com>

Closes #11798 from yy2016/master.
parent 6c2d894a
No related branches found
No related tags found
No related merge requests found
...@@ -492,14 +492,14 @@ class SQLBuilder(logicalPlan: LogicalPlan, sqlContext: SQLContext) extends Loggi ...@@ -492,14 +492,14 @@ class SQLBuilder(logicalPlan: LogicalPlan, sqlContext: SQLContext) extends Loggi
} }
private def addSubqueryIfNeeded(plan: LogicalPlan): LogicalPlan = plan match { private def addSubqueryIfNeeded(plan: LogicalPlan): LogicalPlan = plan match {
case _: SubqueryAlias | case _: SubqueryAlias => plan
_: Filter | case _: Filter => plan
_: Join | case _: Join => plan
_: LocalLimit | case _: LocalLimit => plan
_: GlobalLimit | case _: GlobalLimit => plan
_: SQLTable | case _: SQLTable => plan
_: Generate | case _: Generate => plan
OneRowRelation => plan case OneRowRelation => plan
case _ => addSubquery(plan) case _ => addSubquery(plan)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment