Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4614

Support outer lateral view

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 0.12.0
    • Query Processor
    • None

    Description

      New grammar suggested by appodictic in https://issues.apache.org/jira/browse/HIVE-3534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13665247#comment-13665247

      If UDTF-alias for lateral view forwarded nothing for a input row, regard it as nulls are forwarded keeping columns on select-alias, for example.

      >select * from src LATERAL VIEW explode(array()) C AS a limit 10;
      

      returns nothing because UDTF-alias forwards nothing. But with new grammar,

      >select * from src LATERAL VIEW OUTER explode(array()) C AS a limit 10;
      ...
      238	val_238	NULL
      86	val_86	NULL
      311	val_311	NULL
      27	val_27	NULL
      165	val_165	NULL
      409	val_409	NULL
      255	val_255	NULL
      278	val_278	NULL
      98	val_98	NULL
      484	val_484	NULL
      

      Attachments

        1. HIVE-4614.D10947.1.patch
          14 kB
          Phabricator
        2. HIVE-4614.D10947.2.patch
          22 kB
          Phabricator

        Issue Links

          Activity

            People

              navis Navis Ryu
              navis Navis Ryu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: