[
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340392#comment-16340392
]
ASF GitHub Bot commented on DRILL-6106:
---------------------------------------
Github user vrozov commented on a diff in the pull request:
https://github.com/apache/drill/pull/1099#discussion_r164010865
--- Diff:
contrib/storage-hive/core/src/main/codegen/templates/ObjectInspectors.java ---
@@ -169,9 +169,9 @@ public Boolean getPrimitiveJavaObject(Object o) {
if (o == null) {
return null;
}
- return new Boolean(((NullableBitHolder)o).value == 0 ? false : true);
+ return Boolean.valueOf(((NullableBitHolder)o).value == 0 ? false :
true);
--- End diff --
either `Boolean.valueOf(((NullableBitHolder)o).value != 0);` or
`((NullableBitHolder)o).value == 0 ? Boolean.FALSE : Boolean.TRUE;`
> Use valueOf method instead of constructor since valueOf has a higher
> performance by caching frequently requested values.
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: DRILL-6106
> URL: https://issues.apache.org/jira/browse/DRILL-6106
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Reudismam Rolim de Sousa
> Priority: Minor
>
> Use valueOf method instead of constructor since valueOf has a higherÂ
> performance by caching frequently requested values.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)