Hive
  1. Hive
  2. HIVE-1466

Add NULL DEFINED AS to ROW FORMAT specification

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.13.0
    • Component/s: SQL
    • Labels:
      None
    • Release Note:
      This features enables defining a custom null format for a table via 'create table' statement. A custom null format can also be specified while exporting data to local filesystem using 'insert overwrite .. local dir' statement.

      Description

      NULL values are passed to transformers as a literal backslash and a literal N. NULL values are saved when INSERT OVERWRITing LOCAL DIRECTORies as "NULL". This is inconsistent.

      The ROW FORMAT specification of tables should be able to specify the manner in which a null character is represented. ROW FORMAT NULL DEFINED AS '\N' or '\003' or whatever should apply to all instances of table export and saving.

      1. HIVE-1466.2.patch
        38 kB
        Prasad Mujumdar
      2. HIVE-1466.1.patch
        28 kB
        Prasad Mujumdar

        Issue Links

          Activity

          Hide
          Prasad Mujumdar added a comment -

          Thejas M Nair Thanks for pointing that out. I just updated the wiki to reflect the syntax changes. will add a rel note on the ticket.

          I guess it's a good idea to have a doc jira along with the a patch that introduces a user facing change (SQL syntax, script/tools etc). The reviewers should also verify that before approving the patch.

          Show
          Prasad Mujumdar added a comment - Thejas M Nair Thanks for pointing that out. I just updated the wiki to reflect the syntax changes. will add a rel note on the ticket. I guess it's a good idea to have a doc jira along with the a patch that introduces a user facing change (SQL syntax, script/tools etc). The reviewers should also verify that before approving the patch.
          Hide
          Thejas M Nair added a comment -

          Prasad, can you please add a release note to the jira and create a followup jira for inclusion in wiki (Lefty or someone else might be able to help with incorporation in wiki) or update the wiki page itself directly ?
          We should try to ensure that all new features get documented. I think the best way to do that is to ensure that documentation is available before feature is committed.

          Show
          Thejas M Nair added a comment - Prasad, can you please add a release note to the jira and create a followup jira for inclusion in wiki (Lefty or someone else might be able to help with incorporation in wiki) or update the wiki page itself directly ? We should try to ensure that all new features get documented. I think the best way to do that is to ensure that documentation is available before feature is committed.
          Hide
          Prasad Mujumdar added a comment -

          Patch committed to trunk.

          Show
          Prasad Mujumdar added a comment - Patch committed to trunk.
          Hide
          Xuefu Zhang added a comment -

          +1

          Show
          Xuefu Zhang added a comment - +1
          Hide
          Hive QA added a comment -

          Overall: +1 all checks pass

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12618535/HIVE-1466.2.patch

          SUCCESS: +1 4788 tests passed

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/627/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/627/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          

          This message is automatically generated.

          ATTACHMENT ID: 12618535

          Show
          Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12618535/HIVE-1466.2.patch SUCCESS: +1 4788 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/627/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/627/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated. ATTACHMENT ID: 12618535
          Hide
          Prasad Mujumdar added a comment -

          Addressed review comments, added more test cases

          Show
          Prasad Mujumdar added a comment - Addressed review comments, added more test cases
          Hide
          Xuefu Zhang added a comment -

          Patch looks good. Minor common on RB.

          Show
          Xuefu Zhang added a comment - Patch looks good. Minor common on RB.
          Hide
          Hive QA added a comment -

          Overall: +1 all checks pass

          Here are the results of testing the latest attachment:
          https://issues.apache.org/jira/secure/attachment/12618376/HIVE-1466.1.patch

          SUCCESS: +1 4765 tests passed

          Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/622/testReport
          Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/622/console

          Messages:

          Executing org.apache.hive.ptest.execution.PrepPhase
          Executing org.apache.hive.ptest.execution.ExecutionPhase
          Executing org.apache.hive.ptest.execution.ReportingPhase
          

          This message is automatically generated.

          ATTACHMENT ID: 12618376

          Show
          Hive QA added a comment - Overall : +1 all checks pass Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12618376/HIVE-1466.1.patch SUCCESS: +1 4765 tests passed Test results: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/622/testReport Console output: http://bigtop01.cloudera.org:8080/job/PreCommit-HIVE-Build/622/console Messages: Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase This message is automatically generated. ATTACHMENT ID: 12618376

            People

            • Assignee:
              Prasad Mujumdar
              Reporter:
              Adam Kramer
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development