srielau commented on code in PR #58584:
URL: https://github.com/apache/spark/pull/58584#discussion_r4075677629
##########
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveInspectors.scala:
##########
@@ -829,6 +869,26 @@ private[hive] trait HiveInspectors {
null
}
}
+ case (_, c: CharType) =>
Review Comment:
Acknowledged. A SQLConf guard does not work here because the persisted-view
test legitimately queries a first-class-analyzed view under legacy settings,
and the captured `catalystReturnType` must still be honored -- gating on
execution-time `charVarcharFirstClassTypes` breaks that contract.
The deeper fix (separating the ORC nanos-only policy from UDF CHAR/VARCHAR
enforcement so `readSideCharPadding=false` is respected in ORC reads with a
nanos sibling) requires a distinct recursive entry point or conversion policy,
which is out of scope for this PR. The ORC/table-reader callers today only
reach CHAR/VARCHAR targets when preserve-only mode is enabled, and in that case
padding is the correct behavior (`ApplyCharTypePadding` would apply it anyway).
The `readSideCharPadding=false` interaction is a pre-existing edge case.
I will file a follow-up JIRA for this.
--
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]