Skip to content

Commit

Permalink
SPARK-26666: Use AnalysisException in DataSourceV2Strategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdblue committed Feb 15, 2019
1 parent d67ad46 commit 0e42cc2
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ package org.apache.spark.sql.execution.datasources.v2

import scala.collection.mutable

import org.apache.spark.SparkException
import org.apache.spark.sql.Strategy
import org.apache.spark.sql.{AnalysisException, Strategy}
import org.apache.spark.sql.catalyst.expressions.{And, AttributeReference, AttributeSet, Expression, PredicateHelper}
import org.apache.spark.sql.catalyst.planning.PhysicalOperation
import org.apache.spark.sql.catalyst.plans.logical.{AppendData, LogicalPlan, OverwriteByExpression, OverwritePartitionsDynamic, Repartition}
Expand Down Expand Up @@ -155,7 +154,7 @@ object DataSourceV2Strategy extends Strategy with PredicateHelper {
// fail if any filter cannot be converted. correctness depends on removing all matching data.
val filters = splitConjunctivePredicates(deleteExpr).map {
filter => DataSourceStrategy.translateFilter(deleteExpr).getOrElse(
throw new SparkException(s"Cannot translate expression to source filter: $filter"))
throw new AnalysisException(s"Cannot translate expression to source filter: $filter"))
}.toArray

OverwriteByExpressionExec(
Expand Down

0 comments on commit 0e42cc2

Please sign in to comment.