Skip to content

Commit 905ae96

Browse files
committed
change error message
1 parent b102c36 commit 905ae96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapBuilder.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ class ArrayBasedMapBuilder(keyType: DataType, valueType: DataType) extends Seria
6969
values.append(value)
7070
} else {
7171
if (!allowDuplicatedMapKey) {
72-
throw new RuntimeException(s"Duplicate map key $key was founded, please set " +
73-
s"${LEGACY_ALLOW_DUPLICATED_MAP_KEY.key} to true to remove it with " +
74-
"last wins policy.")
72+
throw new RuntimeException(s"Duplicate map key $key was founded, please check the input " +
73+
"data. If you want to remove the duplicated keys with last-win policy, you can set " +
74+
s"${LEGACY_ALLOW_DUPLICATED_MAP_KEY.key} to true.")
7575
}
7676
// Overwrite the previous value, as the policy is last wins.
7777
values(index) = value

0 commit comments

Comments
 (0)