SQL Error  [HY000]: [Teradata Database] [TeraJDBC 15.10.00.05] [Error 3610] [SQLState HY000] Internal error: Please do not resubmit the last request. SubCode, CrashCode: 0, 0
SELECT customerid, amount FROM ( SELECT * FROM sanity.policy T1 WHERE ( EXISTS( SELECT '1' FROM SANITY.TABLE2 T2 WHERE ( ( T2.BROKER = 'Alice' ) OR ( 'Alice' IN( SELECT T3.BROKER AS val FROM SANITY.TABLE3 T3 WHERE T3.POLICY = T1.ID ) ) ) AND T1.ID = T2.POLICY ) ) AND ( EXISTS ( SELECT '1' FROM SANITY.TABLE2 T2 WHERE ( ( NOT( ( 'Alice' IN( SELECT T3.BROKER AS val FROM SANITY.TABLE3 T3 WHERE T3.POLICY = T1.ID ) ) ) ) OR( ( T2.BROKER = 'Alice' ) AND NOT( ( 1000 < T1.AMOUNT ) ) ) OR( NOT( ( 1000 < T1.AMOUNT ) ) AND( 'Alice' IN( SELECT T3.BROKER AS val FROM SANITY.TABLE3 T3 WHERE T3.POLICY = T1.ID ) ) ) ) AND T1.ID = T2.POLICY ) ) ) policy;
When I looked at logs, it had
INFO: Teradata: 9562 #9562: Internal error has occurred. Query will be retried with the following parser diagnostics enabled: INFO: Teradata: 3601 #3601: A crash dump has been saved. Dec 22 04:10:16 ip-172-30-0-159 Teradata:On Thu Dec 22 04:10:16 2016 on NODE 001-01, VPROC 30719, partition 13, task disstart Dec 22 04:10:16 ip-172-30-0-159 Teradata: Dec 22 04:10:16 ip-172-30-0-159 dmp: DEGRADED: TdatTools: 29003 #PDE DMP Utility -- Control GDO maxdumps exceeded -- no dump captured Dec 22 04:10:17 ip-172-30-0-159 Teradata: INFO: Teradata: 12123 #Event number 33-12123-00 (severity 10, category 11), occurred on Thu Dec 22 04:10:16 2016 at 001-01 (Vproc 30719, partition 13, task 14636) in system teradata15 in Module disstart, version PDE:15.10.02.06,TDBMS:15.10.02.06,PDEGPL:15.10.02.
When any one of the sub-queries were removed, the query was executing just fine. Is it a bug with Teradata 15?
This issue was reproducible in both Teradata 15.10 AWS image and developer edition for VMWare. The query was working fine with Teradata 14.
[ I know the query can be constructed in a better way, however these are machine-generated queries and the efficiency of query is not relevant to the problem mentioned in this topic]