[
https://issues.apache.org/jira/browse/HIVE-28311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17860348#comment-17860348
]
Wechar edited comment on HIVE-28311 at 6/27/24 6:32 AM:
--------------------------------------------------------
[~zabetak] I found this issue in hive client 2.3.8 and server 3.1.2, and this
patch can solve this issue.
But the master has upgrade to Kryo5 in HIVE-22944, then hive client 2.x and 3.x
serialization bytes can not be deserialized successfully in HMS 4.x. Luckily
after applying patch HIVE-22944 in hive 2.x, it works well. I think we can
upgrade kryo in low version clients to solve this issue.
And we can close this ticket now.
was (Author: wechar):
[~zabetak] I found this issue in hive client 2.3.8 and server 3.1.2, and this
patch can solve this issue.
But the master has upgrade to Kryo5 in HIVE-22944, then hive client 2.x and 3.x
serialization bytes can not be deserialized successfully in HMS 4.x. Luckily
after applying patch HIVE-22944 in hive 2.x, it works well. I think we can
upgrade kryo in low version clients to solve this issue.
> Backward compatibility of java.sql.Date and java.sql.Timestamp in hive-serde
> ----------------------------------------------------------------------------
>
> Key: HIVE-28311
> URL: https://issues.apache.org/jira/browse/HIVE-28311
> Project: Hive
> Issue Type: Bug
> Reporter: Wechar
> Assignee: Wechar
> Priority: Major
> Labels: pull-request-available
>
> HIVE-20007 introduced {{org.apache.hadoop.hive.common.type.Date}} and
> {{org.apache.hadoop.hive.common.type.Timestamp}} to replace {{java.sql.Date}}
> and {{{}java.sql.Timestamp{}}}.
> It's a huge improvements but it also produce incompatibility issues for
> clients without this update.
> {code:bash}
> Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to
> org.apache.hadoop.hive.common.type.Timestamp
> at
> org.apache.hadoop.hive.serde2.objectinspector.primitive.JavaTimestampObjectInspector.getPrimitiveWritableObject(JavaTimestampObjectInspector.java:33)
> at
> org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.getTimestamp(PrimitiveObjectInspectorUtils.java:1232)
> at
> org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorConverter$TimestampConverter.convert(PrimitiveObjectInspectorConverter.java:291)
> at
> org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.getConstantObjectInspector(ObjectInspectorUtils.java:1397)
> at
> org.apache.hadoop.hive.ql.plan.ExprNodeConstantDesc.getWritableObjectInspector(ExprNodeConstantDesc.java:93)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeConstantEvaluator.<init>(ExprNodeConstantEvaluator.java:41)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.get(ExprNodeEvaluatorFactory.java:49)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeGenericFuncEvaluator.<init>(ExprNodeGenericFuncEvaluator.java:101)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.get(ExprNodeEvaluatorFactory.java:58)
> at
> org.apache.hadoop.hive.ql.exec.ExprNodeEvaluatorFactory.get(ExprNodeEvaluatorFactory.java:43)
> at
> org.apache.hadoop.hive.ql.optimizer.ppr.PartExprEvalUtils.prepareExpr(PartExprEvalUtils.java:118)
> at
> org.apache.hadoop.hive.ql.optimizer.ppr.PartitionPruner.prunePartitionNames(PartitionPruner.java:551)
> at
> org.apache.hadoop.hive.ql.optimizer.ppr.PartitionExpressionForMetastore.filterPartitionsByExpr(PartitionExpressionForMetastore.java:73)
> at
> org.apache.hadoop.hive.metastore.ObjectStore.getPartitionNamesPrunedByExprNoTxn(ObjectStore.java:3606)
> at
> org.apache.hadoop.hive.metastore.ObjectStore.access$1000(ObjectStore.java:241)
> at
> org.apache.hadoop.hive.metastore.ObjectStore$16.getJdoResult(ObjectStore.java:4157)
> at
> org.apache.hadoop.hive.metastore.ObjectStore$16.getJdoResult(ObjectStore.java:4124)
> at
> org.apache.hadoop.hive.metastore.ObjectStore$GetHelper.run(ObjectStore.java:3913)
> ... 30 more
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)