From 568eac0f775fbfe031626a56d8eee322934936b7 Mon Sep 17 00:00:00 2001 From: Enrico Minack Date: Sat, 17 Aug 2024 22:48:50 +0200 Subject: [PATCH] Simplify getDiffColumns logic (#254) --- src/main/scala/uk/co/gresearch/spark/diff/Diff.scala | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/scala/uk/co/gresearch/spark/diff/Diff.scala b/src/main/scala/uk/co/gresearch/spark/diff/Diff.scala index 1573b27f..8636bac3 100644 --- a/src/main/scala/uk/co/gresearch/spark/diff/Diff.scala +++ b/src/main/scala/uk/co/gresearch/spark/diff/Diff.scala @@ -195,8 +195,7 @@ class Differ(options: DiffOptions) { .map(c => ( handleConfiguredCaseSensitivity(c), - c -> (if (options.sparseMode) when(not(left(backticks(c)) <=> right(backticks(c))), left(backticks(c))) - else left(backticks(c))) + c -> when(not(left(backticks(c)) <=> right(backticks(c))), left(backticks(c))) ) ) .toMap, @@ -204,8 +203,7 @@ class Differ(options: DiffOptions) { .map(c => ( handleConfiguredCaseSensitivity(c), - c -> (if (options.sparseMode) when(not(left(backticks(c)) <=> right(backticks(c))), right(backticks(c))) - else right(backticks(c))) + c -> when(not(left(backticks(c)) <=> right(backticks(c))), right(backticks(c))) ) ) .toMap