[ https://issues.apache.org/jira/browse/HIVE-20849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16760413#comment-16760413 ]
BELUGA BEHR commented on HIVE-20849: ------------------------------------ The patch here includes the following change in addition to the logging: {code:java} - new Long(((Integer) convObj).intValue()); + Long.valueOf(((Integer) convObj).longValue()); {code} This is because with the current code, a new {{Long}} object is created every time, whereas the {{Long#valueOf}} code benefits from caching: {quote} If a new Long instance is not required, this method should generally be used in preference to the constructor Long(long), as this method is likely to yield significantly better space and time performance by caching frequently requested values {quote} https://docs.oracle.com/javase/7/docs/api/java/lang/Long.html#valueOf(long) > Review of ConstantPropagateProcFactory > -------------------------------------- > > Key: HIVE-20849 > URL: https://issues.apache.org/jira/browse/HIVE-20849 > Project: Hive > Issue Type: Improvement > Components: Logical Optimizer > Affects Versions: 3.1.0, 4.0.0 > Reporter: BELUGA BEHR > Assignee: BELUGA BEHR > Priority: Minor > Attachments: HIVE-20849.1.patch, HIVE-20849.1.patch, > HIVE-20849.2.patch, HIVE-20849.3.patch, HIVE-20849.4.patch, > HIVE-20849.5.patch, HIVE-20849.6.patch > > > I was looking at this class because it blasts a lot of useless (to an admin) > information to the logs. Especially if the table has a lot of columns, I see > big blocks of logging that are meaningless to me. I request that the logging > is toned down to debug, and some other improvements to the code. -- This message was sent by Atlassian JIRA (v7.6.3#76005)