Skip to content

Commit

Permalink
Simplify getDiffColumns logic (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi authored Aug 17, 2024
1 parent 514aedd commit 568eac0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/scala/uk/co/gresearch/spark/diff/Diff.scala
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,15 @@ 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,
rightNonPkColumns
.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
Expand Down

0 comments on commit 568eac0

Please sign in to comment.