[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16347848#comment-16347848
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user asfgit closed the pull request at:

https://github.com/apache/drill/pull/1099


> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16347506#comment-16347506
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user vrozov commented on the issue:

https://github.com/apache/drill/pull/1099
  
@reudismam Travis fails in other PRs as well. See #1105.


> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16347366#comment-16347366
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
Only pass Travis CI by removing the edits to SSLConfigClient.java


> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16347178#comment-16347178
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
I have squashed the commits, but I’m getting an error in Travis CI similar 
to the previous one when I reverted some changes.
Column a-offsets of type UInt4Vector: Offset (0) must be 0 but was 1



> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16346581#comment-16346581
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
Maybe it has not worked as expected. It squashed the commit (first commit), 
but as the commit mix commits from other persons, they come together. Maybe it 
will be the case of creating a patch file for the desired commit and apply this 
patch to a new pull request. 


> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16346587#comment-16346587
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/1099
  
Well, you can always use force push to override your previous changes or 
even replace your remote branch with new local.


> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16346299#comment-16346299
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user vrozov commented on the issue:

https://github.com/apache/drill/pull/1099
  
@reudismam For drill, merging/squashing on github is not an option (due to 
the way how Apache Drill git is setup). Please rebase and squash.


> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16345836#comment-16345836
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
Since I have to resolve some conflicts after applying the edit, squashing 
could be tricky because the commits are non-consecutive. I allowed the merging 
using the squashing option in the forked project setting. Thus, when someone 
merges the pull request, he or she can decide to squash the commits.


![image](https://user-images.githubusercontent.com/1970407/35592031-8fdf4aee-05ea-11e8-9446-cd88c1dd0fd0.png)



> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16345371#comment-16345371
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user vrozov commented on the issue:

https://github.com/apache/drill/pull/1099
  
LGTM, please squash.


> 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
>Affects Versions: 1.12.0
>Reporter: Reudismam Rolim de Sousa
>Assignee: Reudismam Rolim de Sousa
>Priority: Minor
>  Labels: ready-to-commit
> Fix For: 1.13.0
>
>
> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16345041#comment-16345041
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/1099
  
LGTM, @vrozov?


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16344953#comment-16344953
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/1099
  
@reudismam I guess you can apply back your change for 
`SSLConfigClient.java` class.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16344039#comment-16344039
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user vrozov commented on the issue:

https://github.com/apache/drill/pull/1099
  
Travis CI failed due to a known issue 
`TestSortImpl.testLargeBatch:502->runJumboBatchTest:475->runLargeSortTest:454 
Value of 1:0 expected:<0> but was:<1>` unrelated to the SSLConfigClient.java 
changes.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16343960#comment-16343960
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
I reverted the edit because the code does not pass in Travis CI.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16343946#comment-16343946
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user vrozov commented on the issue:

https://github.com/apache/drill/pull/1099
  
What was the reason to revert the change in SSLConfigClient.java?


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16343662#comment-16343662
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/1099
  
@reudismam you can leave `valueOf` for Double and Float for consistency. 
There are two other comments @vrozov has left. Could you please address hem 
as well? They are not directly related to your changes but will make Drill code 
better. Also please squash commits into one.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16343652#comment-16343652
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
Conflicts resolved. Do you want to revert the edits to Double and Float? I 
think it is ok for consistency. 


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16343354#comment-16343354
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/1099
  
@reudismam could you please address code review comments so changes can be 
pushed into master? Also please resolve merge conflict.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16341281#comment-16341281
 ] 

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_r164165401
  
--- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java ---
@@ -94,7 +94,7 @@ private String getStringProperty(String name, String 
defaultValue) {
   private int getIntProperty(String name, int defaultValue) {
 int value = defaultValue;
 if ( (properties != null) && (properties.containsKey(name))) {
-  value = new Integer(properties.getProperty(name)).intValue();
+  value = Integer.valueOf(properties.getProperty(name)).intValue();
--- End diff --

Do not always trust Java doc :). Here is the actual implementation:

```
public static Double valueOf(double d) {
return new Double(d);
}
```


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16340873#comment-16340873
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on a diff in the pull request:

https://github.com/apache/drill/pull/1099#discussion_r164076111
  
--- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java ---
@@ -94,7 +94,7 @@ private String getStringProperty(String name, String 
defaultValue) {
   private int getIntProperty(String name, int defaultValue) {
 int value = defaultValue;
 if ( (properties != null) && (properties.containsKey(name))) {
-  value = new Integer(properties.getProperty(name)).intValue();
+  value = Integer.valueOf(properties.getProperty(name)).intValue();
--- End diff --

According to Java documentation, there are benefits in using valueOf for 
Double and Float.


https://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#valueOf(double)

https://docs.oracle.com/javase/7/docs/api/java/lang/Float.html#valueOf(float)


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16340391#comment-16340391
 ] 

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_r164010530
  
--- Diff: 
contrib/storage-hbase/src/test/java/org/apache/drill/hbase/TestOrderedBytesConvertFunctions.java
 ---
@@ -54,7 +54,7 @@ public void testOrderedBytesDouble() throws Throwable {
 
   @Test
   public void testOrderedBytesDoubleConvertFrom() throws Throwable {
-
verifyPhysicalPlan("convert_from(binary_string('\\x31\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\x01'),
 'DOUBLE_OB')", new Double(4.9e-324));
+
verifyPhysicalPlan("convert_from(binary_string('\\x31\\x80\\x00\\x00\\x00\\x00\\x00\\x00\\x01'),
 'DOUBLE_OB')", Double.valueOf(4.9e-324));
--- End diff --

For `Double` and `Float` there is no benefit using `valueOf()`, OK if used 
for consistency.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16340390#comment-16340390
 ] 

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_r164012734
  
--- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/ssl/SSLConfigClient.java ---
@@ -94,7 +94,7 @@ private String getStringProperty(String name, String 
defaultValue) {
   private int getIntProperty(String name, int defaultValue) {
 int value = defaultValue;
 if ( (properties != null) && (properties.containsKey(name))) {
-  value = new Integer(properties.getProperty(name)).intValue();
+  value = Integer.valueOf(properties.getProperty(name)).intValue();
--- End diff --

```
if (properties != null) {
  String property = properties.getProperty(name);
  if (property != null && property.length() > 0) {
value = Integer.decode(property);
  }
```


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16339385#comment-16339385
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
Reverted changes to classes in the protocol package.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16339202#comment-16339202
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/1099
  
@reudismam classes in protocol package are generated using .proto files, 
you can not change them.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16339093#comment-16339093
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user arina-ielchiieva commented on the issue:

https://github.com/apache/drill/pull/1099
  
@reudismam the idea of the fix seems reasonable but there are many other 
places in code where constructor is used instead of `valueOf`. I suggest you 
revisit all classes rather then doing partial fix.


> 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)


[jira] [Commented] (DRILL-6106) Use valueOf method instead of constructor since valueOf has a higher performance by caching frequently requested values.

2018-01-25 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DRILL-6106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16339078#comment-16339078
 ] 

ASF GitHub Bot commented on DRILL-6106:
---

Github user reudismam commented on the issue:

https://github.com/apache/drill/pull/1099
  
I have edited the PR to include the Jira prefix.


> 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)