[ 
https://issues.apache.org/jira/browse/BEAM-6513?focusedWorklogId=191192&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-191192
 ]

ASF GitHub Bot logged work on BEAM-6513:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/19 18:36
            Start Date: 28/Jan/19 18:36
    Worklog Time Spent: 10m 
      Work Description: apilloud commented on pull request #7636: [BEAM-6513] 
Fix NPE in BeamEnumerableConverter
URL: https://github.com/apache/beam/pull/7636#discussion_r251540137
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/rel/BeamEnumerableConverter.java
 ##########
 @@ -240,7 +255,11 @@ public void startBundle(StartBundleContext context) {
     public void processElement(ProcessContext context) {
       Object[] avaticaRow = rowToAvatica(context.element());
       if (avaticaRow.length == 1) {
 
 Review comment:
   It seems like this could be solved in a much simpler manner if you removed 
the unboxing (this `if` block) from `processElement` and instead did it in 
collect. So collect becomes:
   
   ```
   if  (avaticaRow.length == 1) {
      List<Object> unboxed = new ArrayList();
      // code to iterate and unbox values
      return Linq4j.asEnumerable(unboxed);
   }
   return Linq4j.asEnumerable(values);
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 191192)
    Time Spent: 1h 10m  (was: 1h)

> BeamEnumerableConverter doest not handle Null during collecting values
> ----------------------------------------------------------------------
>
>                 Key: BEAM-6513
>                 URL: https://issues.apache.org/jira/browse/BEAM-6513
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to