You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/22 20:27:16 UTC

[jira] [Commented] (TRAFODION-2084) inserting invalid data into a hive column does not return error

    [ https://issues.apache.org/jira/browse/TRAFODION-2084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15345102#comment-15345102 ] 

ASF GitHub Bot commented on TRAFODION-2084:
-------------------------------------------

GitHub user anoopsharma00 opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/555

    JIRA TRAFODION-2084 Handling of invalid data inserts into hive tables

    cqd hive_insert_error_mode '<val>' has been added to control
    insert behavior.
      if 0, datatype error check is not done during inserts into hive tables.
             Invalid values may get inserted.
             This is the behavior prior to this JIRA fix.
      if 1, error check done, row is not inserted if conversion error.
             Insertion stops. This is new default behavior.
      if 2, error check done, row is not inserted if conversion error.
             Insertion continues with next row
      if 3, null inserted if conversion error.
             Insertion processing continues. This is hive behavior.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/anoopsharma00/incubator-trafodion ansharma_hiveinserr_br

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/555.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #555
    
----
commit 392c60889cb437e08e3718a3fc54c244cbfb123b
Author: Anoop Sharma <an...@esgyn.com>
Date:   2016-06-22T20:19:59Z

    JIRA TRAFODION-2084 Handling of invalid data inserts into hive tables
    
    cqd hive_insert_error_mode '<val>' has been added to control
    insert behavior.
      if 0, datatype error check is not done during inserts into hive tables.
             Invalid values may get inserted.
             This is the behavior prior to this JIRA fix.
      if 1, error check done, row is not inserted if conversion error.
             Insertion stops. This is new default behavior.
      if 2, error check done, row is not inserted if conversion error.
             Insertion continues with next row
      if 3, null inserted if conversion error.
             Insertion processing continues. This is hive behavior.

----


> inserting invalid data into a hive column does not return error
> ---------------------------------------------------------------
>
>                 Key: TRAFODION-2084
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2084
>             Project: Apache Trafodion
>          Issue Type: Bug
>            Reporter: Anoop Sharma
>            Assignee: Anoop Sharma
>
> If invalid data is inserted into a hive table, it doesn't return an error
> during insert time.
> But error is returned when that invalid data is accessed during select.
> It makes the table unusable.
> Example:
> Create table from hive:
> hive> create table t (a smallint);
> OK
> Time taken: 0.079 seconds
> hive> 
> Insert invalid data from traf sqlci which succeeds:
> Apache Trafodion Conversational Interface 2.1.0
> Copyright (c) 2015-2016 Apache Software Foundation
> >>insert into hive.hive.t values (11111111);
> --- 1 row(s) inserted.
> >>
> Selecting that data returns error:
> >>select * from hive.hive.t;
> *** ERROR[8411] A numeric overflow occurred during an arithmetic computation or data conversion. Conversion of Source Type:VARCHAR(REC_BYTE_V_ASCII,8 BYTES,ISO88591) Source Value:11111111 to Target Type:SMALLINT SIGNED(REC_BIN16_SIGNED).
> --- 0 row(s) selected.
> >>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)