Skip to content

Commit

Permalink
Disallow re-validating on plans that were failed in earlier validatio…
Browse files Browse the repository at this point in the history
…n across rules
  • Loading branch information
zhztheplayer authored Jan 13, 2023
1 parent 42d8477 commit af5c650
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ object TransformHints {

def tag(plan: SparkPlan, hint: TransformHint): Unit = {
if (isAlreadyTagged(plan)) {
// FIXME for tag change:
// Allow TRANSFORM_SUPPORTED -> TRANSFORM_UNSUPPORTED
// Disallow TRANSFORM_UNSUPPORTED -> TRANSFORM_SUPPORTED
// Or just remove the tag value TRANSFORM_SUPPORTED
if (isNotTransformable(plan) && hint.isInstanceOf[TRANSFORM_SUPPORTED]) {
throw new UnsupportedOperationException(
s"Plan was already tagged as non-transformable, " +
s"cannot mark it as transformable after that: ${plan.toString()}")
}
untag(plan)
}
plan.setTagValue(TAG, hint)
Expand Down

0 comments on commit af5c650

Please sign in to comment.