GROUP BY queries with index may fail

Details

Detail name Value
Changelog Number 15307
Type Bug
Status Resolved
Affected Versions Exasol 7.0.0, Exasol 7.1.0, Exasol 8.0.0
Fix Versions Exasol 7.1.13, Exasol 8.4.0
Resolution Date 2022-08-24

Description

If the following conditions are met, a query may fail with the error message "Successfully reconnected after internal server error, transaction was rolled back."

  • Query contains a GROUP BY clause
  • The GROUP BY clause contains at least 3 elements
  • One of the elements references a column with an index
  • This element is not in the SELECT list. Note: optimizations may remove columns from the SELECT list.
  • The FROM clause contains a table without a JOIN
  • The query has an ORDER BY clause

Example

create schema test;
CREATE OR REPLACE TABLE test.t(c1 decimal, c2 decimal, c3 decimal, c4 decimal);
ENFORCE GLOBAL INDEX ON test.t( c1 );

-- The following query crashes
SELECT c2 -- the index column is not in the select list
FROM test.t -- simple table, not a join
GROUP BY c1, c2, c3 -- at least 3 elements that point to test.t necessary here
ORDER BY FALSE -- Any order by and limit clause is required
;

Workaround

Add all elements in the GROUP BY to the SELECT list.

Fix

In these scenarios, the query completes successfully.