hivemall-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myui <...@git.apache.org>
Subject [GitHub] incubator-hivemall issue #135: [WIP] Merge Brickhouse functions
Date Thu, 05 Apr 2018 09:38:55 GMT
Github user myui commented on the issue:

    https://github.com/apache/incubator-hivemall/pull/135
  
    ```sql
    create temporary function conditional_emit as 'hivemall.tools.array.ConditionalEmitUDTF';
    
    WITH input as (
       select array(true, false, true) as conditions, array("one", "two", "three") as features
       UNION ALL
       select array(true, true, false), array("four", "five", "six")
    )
    select
      conditional_emit(
         conditions, features
      )
    from 
      input;
    ```
    
    |feature|
    |:-:|
    |one|
    |three|
    |four|
    |five|


---

Mime
View raw message