myui opened a new pull request #217: [HIVEMALL-165] Fixed to accept any 
primitive
URL: https://github.com/apache/incubator-hivemall/pull/217
 
 
   ## What changes were proposed in this pull request?
   
   Fix a bug that `array_remove` UDF throws exception when the first argument 
is null
   
   ## What type of PR is it?
   
   Bug Fix
   
   ## What is the Jira issue?
   
   https://issues.apache.org/jira/browse/HIVEMALL-165
   
   ## How was this patch tested?
   
   manual tests on EMR
   
   ## How to use this feature?
   
   ```sql
   WITH data4 as (
     select false as n, array('2.0', '3.0', '4.0') as nums
   )
   select 
     array_remove(if(n = true, null, nums), '2.0') as c1,
     array_remove(if(n = true, null, nums), array('3.0','2.0')) as c2,
     array_remove(if(n = false, null, nums), '2.0') as c3
   from
     data4;
   
   WITH data4 as (
     select false as n, array(2.0, 3.0, 4.0) as nums
   )
   select 
     array_remove(if(n = true, null, nums), 2.0) as c1,
     array_remove(if(n = true, null, nums), array(3.0,2.0)) as c2,
     array_remove(if(n = false, null, nums), 2.0) as c3
   from
     data4;
   ```
   
   ## Checklist
   
   - [x] Did you apply source code formatter, i.e., `./bin/format_code.sh`, for 
your commit?
   - [ ] Did you run system tests on Hive (or Spark)?
   

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


With regards,
Apache Git Services

Reply via email to