srielau commented on code in PR #58413:
URL: https://github.com/apache/spark/pull/58413#discussion_r3915689343
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -3848,7 +3848,10 @@ class AstBuilder extends DataTypeAstBuilder
throw QueryParsingErrors.emptyQuantifiedPatternError(ctx)
}
val expressions = expressionList(ctx.expression)
- if (expressions.forall(_.foldable) &&
expressions.forall(_.dataType == StringType)) {
+ if (expressions.forall(_.foldable) &&
+ expressions.forall(
+ expression => expression.resolved &&
+
DataTypeUtils.isDefaultStringCharOrVarcharType(expression.dataType))) {
Review Comment:
Addressed in a7d626d0c8d. Quantified ILIKE now lowercases only non-null
patterns, so foldable CHAR/VARCHAR NULLs follow SQL three-valued logic instead
of throwing. Added ANY and ALL coverage with CAST(NULL AS CHAR/VARCHAR).
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -3848,7 +3848,10 @@ class AstBuilder extends DataTypeAstBuilder
throw QueryParsingErrors.emptyQuantifiedPatternError(ctx)
}
val expressions = expressionList(ctx.expression)
- if (expressions.forall(_.foldable) &&
expressions.forall(_.dataType == StringType)) {
+ if (expressions.forall(_.foldable) &&
+ expressions.forall(
+ expression => expression.resolved &&
+
DataTypeUtils.isDefaultStringCharOrVarcharType(expression.dataType))) {
Review Comment:
Addressed in a7d626d0c8d. Explicitly collated quantified patterns stay on
the LIKE/ILIKE expansion path, now combined as a balanced tree so large
UTF8_BINARY lists keep logarithmic depth. Added ANY/SOME/ALL and negated
coverage for 2048 explicit UTF8_BINARY patterns.
##########
connector/protobuf/src/main/scala/org/apache/spark/sql/protobuf/ProtobufSerializer.scala:
##########
@@ -112,7 +112,7 @@ private[sql] class ProtobufSerializer(
(getter, ordinal) => getter.getFloat(ordinal)
Review Comment:
Addressed in a7d626d0c8d. The SPARK-59112 Protobuf test now serializes
CHAR/VARCHAR through the STRING field, ENUM (valid and invalid symbols), and
StringValue wrapper converters.
--
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]