okumin commented on PR #4851: URL: https://github.com/apache/hive/pull/4851#issuecomment-2109446890
@basapuram-kumar @deniskuzZ Hi, we are also hitting this problem, and I found the issue happens when both of the following conditions are satisfied. - `GenericUDFTimestamp` is evaluated at runtime where no hive-site.xml is located, which typically means TezChild - It is vectorized. `VectorSelectOperator` is unlikely to have the issue I guess the current implementation partially works but it could not be perfect as `intToTimestampInSeconds` can be still wrongly configured. Could you please try to fix the issue in the correct way? I can take it over if you prefer it. This is the minimal reproduction in my environment. ``` CREATE TABLE test AS SELECT 0 AS ts; set hive.fetch.task.conversion=none; set hive.strict.timestamp.conversion=false; set hive.vectorized.execution.enabled=false; SELECT CAST(ts AS TIMESTAMP) FROM test; ``` ``` Caused by: java.lang.RuntimeException: Map operator initialization failed at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.init(MapRecordProcessor.java:351) at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:292) ... 16 more Caused by: org.apache.hadoop.hive.ql.exec.UDFArgumentException: Casting NUMERIC types to TIMESTAMP is prohibited (hive.strict.timestamp.conversion) at org.apache.hadoop.hive.ql.udf.generic.GenericUDFTimestamp.initialize(GenericUDFTimestamp.java:91) at org.apache.hadoop.hive.ql.udf.generic.GenericUDF.initializeAndFoldConstants(GenericUDF.java:149) at org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.initialize(ExprNodeGenericFuncEvaluator.java:184) at org.apache.hadoop.hive.ql.exec.Operator.initEvaluators(Operator.java:1073) at org.apache.hadoop.hive.ql.exec.Operator.initEvaluatorsAndReturnStruct(Operator.java:1099) at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:74) at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:360) ``` -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org