pedrumj2 commented on code in PR #12976:
URL: https://github.com/apache/gluten/pull/12976#discussion_r4001118120
##########
gluten-ut/spark34/src/test/scala/org/apache/spark/sql/GlutenCharVarcharTestSuite.scala:
##########
@@ -58,34 +58,71 @@ class GlutenFileSourceCharVarcharTestSuite
}
}
+ // scalastyle:off line.size.limit
+ /**
+ * Source:
+ *
https://github.com/apache/spark/blob/v3.4.4/sql/core/src/test/scala/org/apache/spark/sql/CharVarcharTestSuite.scala#L351
+ *
+ * Why:
+ *
https://github.com/apache/spark/blob/v3.4.4/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TableOutputResolver.scala#L229
+ * wraps a map column written to a char/varchar target in
`MapFromArrays(..)`, so enabling
+ * `map_from_arrays` moves the length check into Velox, which words it
differently.
+ */
+ // scalastyle:on line.size.limit
testGluten("length check for input string values: nested in map key") {
testTableWrite {
typeName =>
sql(s"CREATE TABLE t(c MAP<$typeName(5), STRING>) USING $format")
val e = intercept[SparkException](sql("INSERT INTO t VALUES
(map('123456', 'a'))"))
- assert(e.getMessage.contains(ERROR_MESSAGE))
+ // Before: assert(e.getMessage.contains(ERROR_MESSAGE))
+ assert(e.getMessage.contains(VELOX_ERROR_MESSAGE))
}
}
+ // scalastyle:off line.size.limit
Review Comment:
Thank @philo-he. I removed the "scalastyle:off" and ran the
`./dev/format-scala-code.sh` command. Please let me know if there is anything
else to do on my end.
--
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]