MaxGekk commented on code in PR #38896:
URL: https://github.com/apache/spark/pull/38896#discussion_r1039702821
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapData.scala:
##########
@@ -28,7 +29,10 @@ import org.apache.spark.util.collection.Utils
* elements, otherwise the behavior is undefined.
*/
class ArrayBasedMapData(val keyArray: ArrayData, val valueArray: ArrayData)
extends MapData {
- require(keyArray.numElements() == valueArray.numElements())
+ checkInternalError(
Review Comment:
This one is an user-facing error, actually. See the failed test:
```
JsonFunctionsSuite.SPARK-33134: return partial results only for root JSON
objects
org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in
stage 186.0 failed 1 times, most recent failure: Lost task 0.0 in stage 186.0
(TID 227) (localhost executor driver): org.apache.spark.SparkException:
[INTERNAL_ERROR] The number of key elements 1 and value elements 0 must be the
same.
at
org.apache.spark.SparkException$.internalError(SparkException.scala:77)
at
org.apache.spark.SparkException$.internalError(SparkException.scala:81)
at
org.apache.spark.SparkException$.checkInternalError(SparkException.scala:97)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]