pgaref commented on a change in pull request #1982:
URL: https://github.com/apache/hive/pull/1982#discussion_r578334938
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/udf/TimestampCastRestrictorResolver.java
##########
@@ -45,7 +45,7 @@
public TimestampCastRestrictorResolver(UDFMethodResolver parentResolver) {
this.parentResolver = parentResolver;
SessionState ss = SessionState.get();
- if (ss != null &&
ss.getConf().getBoolVar(ConfVars.HIVE_STRICT_TIMESTAMP_CONVERSION)) {
+ if (ss != null &&
ss.getConf().getBoolVar(ConfVars.HIVE_STRICT_CHECKS_TYPE_SAFETY)) {
Review comment:
Hey Stamati, it seems that if if its not a direct conversion that can be
checked with LOSSY_CONVERSIONS, it has to be part of the UDF init. For example:
- Bigint cannot be cast to a double:
https://github.com/apache/hive/blob/adf426a87e60e0b99dec7e8aee7d1a5e12462161/ql/src/java/org/apache/hadoop/hive/ql/plan/ExprNodeGenericFuncDesc.java#L248
- Date only allows timestamps and Strings
https://github.com/apache/hive/blob/853e1d1f9d17ef61637f094b7bd2cccf44931124/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToDate.java#L68
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]