[ https://issues.apache.org/jira/browse/HIVE-26539?focusedWorklogId=814224&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814224 ]
ASF GitHub Bot logged work on HIVE-26539: ----------------------------------------- Author: ASF GitHub Bot Created on: 06/Oct/22 04:36 Start Date: 06/Oct/22 04:36 Worklog Time Spent: 10m Work Description: hsnusonic commented on code in PR #3605: URL: https://github.com/apache/hive/pull/3605#discussion_r988535311 ########## ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java: ########## @@ -228,6 +230,27 @@ public void setConf(Configuration conf) { public Configuration getConf() { return configuration; } + + @Override + public com.esotericsoftware.kryo.Registration getRegistration(Class type) { Review Comment: Just to make sure my understanding is correct, is this method called before the class being instantiated? So, we can avoid some classes be instantiated. ########## ql/src/java/org/apache/hadoop/hive/ql/exec/SerializationUtilities.java: ########## @@ -830,13 +853,17 @@ public static byte[] serializeObjectWithTypeInformation(Serializable object) { /** * Deserializes expression from Kryo. * @param bytes Bytes containing the expression. + * @param isPartFilter ture if it is a partition filter * @return Expression; null if deserialization succeeded, but the result type is incorrect. */ - public static <T> T deserializeObjectWithTypeInformation(byte[] bytes) { - Kryo kryo = borrowKryo(); + public static <T> T deserializeObjectWithTypeInformation(byte[] bytes, + boolean isPartFilter) { + KryoWithHooks kryo = (KryoWithHooks) borrowKryo(); + kryo.setExprNodeFirst(isPartFilter); try (Input inp = new Input(new ByteArrayInputStream(bytes))) { return (T) kryo.readClassAndObject(inp); } finally { + kryo.setExprNodeFirst(false); Review Comment: Can we reset this field in `releaseKryo()`? Issue Time Tracking ------------------- Worklog Id: (was: 814224) Time Spent: 40m (was: 0.5h) > Kryo deserialization improvements > --------------------------------- > > Key: HIVE-26539 > URL: https://issues.apache.org/jira/browse/HIVE-26539 > Project: Hive > Issue Type: Improvement > Reporter: Zhihua Deng > Assignee: Zhihua Deng > Priority: Major > Labels: pull-request-available > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.10#820010)