trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsharma00 <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: [TRAFODION-1920] suppress SQL er...
Date Wed, 04 May 2016 14:07:02 GMT
Github user anoopsharma00 commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/461#discussion_r62044508
  
    --- Diff: core/sql/regress/hive/EXPECTED005 ---
    @@ -534,4 +534,101 @@ C1           C2
     >>cqd HIVE_SCAN_SPECIAL_MODE reset;
     
     --- SQL operation complete.
    +>>select * from tbl_bad;
    +
    +*** ERROR[8413] The string argument contains characters that cannot be converted.
    +
    +--- 0 row(s) selected.
    +>>cqd HIVE_SCAN_SPECIAL_MODE '2';
    +
    +--- SQL operation complete.
    +>>select * from tbl_bad;
    +
    +C1           C2                    C3                         C4               C5   
  C6                          C7                                                 C8
    +-----------  --------------------  -------------------------  ---------------  ------
 --------------------------  -------------------------                          ------
    +
    +          ?                     ?  c                                        ?       ?
 ?                                                   ?                               ?
    +          ?                     ?  c                                        ?       ?
 2017-01-01 10:10:10.000000   1.01000000000000000E+000                               1
    +          ?                     ?                                           ?       ?
 ?                                                   ?                               ?
    +          1                     1  averylongstring            -1.0000000E+000       0
 2017-01-01 10:10:10.000000   1.00010000000000000E+002                               1
    +          2                     2  good                        1.1000000E+000       2
 2017-01-01 10:10:10.000000   2.00000000000000000E+002                            1000
    +          3                     3  good                        1.0000000E+000       2
 2017-01-01 10:10:10.000000   2.10000000000000000E+002                              10
    +          ?            4294967295  good                        3.3999999E+038       ?
 2017-01-01 10:10:10.000000   1.69999999999999968E+308                              10
    +          0            9999999999  bad                                      ?       ?
 ?                                                   ?       ?
    +
    +--- 8 row(s) selected.
    +>>cqd HIVE_SCAN_SPECIAL_MODE reset;
    +
    +--- SQL operation complete.
    +>>drop table if exists trafodion.seabase.traf_tbl_bad;
    +
    +--- SQL operation complete.
    +>>create table trafodion.seabase.traf_tbl_bad (
    ++>c1 int,
    ++>c2 largeint,
    ++>c3 varchar(25),
    ++>c4 real,
    ++>c5 smallint,
    ++>c6 timestamp(6),
    ++>c7 float(54),
    ++>c8 smallint
    ++>);
    +
    +--- SQL operation complete.
    +>>load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
    +
    +*** ERROR[8413] The string argument contains characters that cannot be converted.
    +
    +--- 0 row(s) loaded.
    +>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
    +
    +*** ERROR[8413] The string argument contains characters that cannot be converted.
    +
    +--- 0 row(s) inserted.
    +>>upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
    +
    +*** ERROR[8413] The string argument contains characters that cannot be converted.
    +
    +--- 0 row(s) inserted.
    +>>cqd HIVE_SCAN_SPECIAL_MODE '2';
    +
    +--- SQL operation complete.
    +>>load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
    +
    +--- 8 row(s) loaded.
    +>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
    +
    +--- 8 row(s) inserted.
    +>>upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
    +
    +--- 8 row(s) inserted.
    +>>cqd HIVE_SCAN_SPECIAL_MODE reset;
    +
    +--- SQL operation complete.
    +>>drop table if exists trafodion.seabase.traf_tbl_bad;
    +
    +--- SQL operation complete.
    +>>create table trafodion.seabase.traf_tbl_bad (
    ++>c1 int not null,
    ++>c2 largeint not null,
    ++>c3 varchar(25),
    ++>c4 real,
    ++>c5 smallint,
    ++>c6 timestamp(6) not null,
    ++>c7 float(54) not null,
    ++>c8 smallint
    ++>);
    +
    +--- SQL operation complete.
    +>>cqd HIVE_SCAN_SPECIAL_MODE '2';
    +
    +--- SQL operation complete.
    +>>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad;
    +
    --- End diff --
    
    It might be helpful if the original conversion error is added as a warning. Maybe based
on some setting(cqd), warnings could be added and returned. One can also check for max number
of warnings instead of adding all of them. But that is not a hard requirement for now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message