MaxGekk commented on code in PR #38896:
URL: https://github.com/apache/spark/pull/38896#discussion_r1040051601
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ArrayBasedMapData.scala:
##########
@@ -26,6 +26,9 @@ import org.apache.spark.util.collection.Utils
*
* Note that, user is responsible to guarantee that the key array does not
have duplicated
* elements, otherwise the behavior is undefined.
+ *
+ * @throws IllegalArgumentException If the number of elements in `keyArray`
and `valueArray`
+ * are different.
*/
class ArrayBasedMapData(val keyArray: ArrayData, val valueArray: ArrayData)
extends MapData {
require(keyArray.numElements() == valueArray.numElements())
Review Comment:
I have to leave it as is because JSON datasource expects
`IllegalArgumentException` otherwise it propagates `SparkException` w/
`INTERNAL_ERROR` to users.
--
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]