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

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

vvysotskyi commented on pull request #1843: DRILL-7350: Move RowSet related 
classes from test folder
URL: https://github.com/apache/drill/pull/1843#discussion_r314648059
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/rowSet/RowSetWriterImpl.java
 ##########
 @@ -129,7 +129,7 @@ public RowSetWriter addRow(Object...values) {
 
   @Override
   public RowSetWriter addSingleCol(Object value) {
-    return addRow(new Object[] {value});
+    return addRow(value);
 
 Review comment:
   Actually, it should work as expected. Java determines how to treat incoming 
arguments at the compilation stage, so if the reference has a non-array type, 
it will be treated as a single element of vararg even if actual type of the 
object is an array.
   Here is these two different cases:
   ```
   addRow(new String[]{"a", "a"});
   ```
   and the same case as in the code:
   ```
   Object value = new String[]{"a", "a"};
   addRow(value);
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Move RowSet related classes from test folder
> --------------------------------------------
>
>                 Key: DRILL-7350
>                 URL: https://issues.apache.org/jira/browse/DRILL-7350
>             Project: Apache Drill
>          Issue Type: Task
>            Reporter: Volodymyr Vysotskyi
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>             Fix For: 1.17.0
>
>
> Move RowSet related classes from test folder to main to be able to use them 
> for Metastore.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to