Github user traflm commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/461#discussion_r62136601
--- 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 --
Yes, the error message will depends on which node the expression get
evaluated, so it is better to add converting error as warnings. I need to
better understand details of DiagArea, I didn't remove errors during
convDoIt(), it should still in the DiagArea, I need to understand if DiagArea
is statement global or per operator. And not sure which DiagArea the final
sqlci displays.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---