

a. Execution failed due to mismatched datatypes.
Error: QueryEngine encountered error: Execute Query failed.
Error type: Odbc error. Odbc operation attempted: SQLExecDirect. [HY000:932: on SQLHANDLE] [Strategy][ODBC Oracle Wire Protocol driver][Oracle]ORA-00932: inconsistent datatypes: expected NUMBER got DATE.
b. Report able to execute but data is wrong because column datatype is incorrect, for example:

If user check the SQL statement, a mismatch of data type can be found:
create table TZELQ22AAMD000 ( YEAR_ID DECIMAL(38, 0), WJXBFS1 DOUBLE) insert into TZELQ22AAMD000 select a11.YEAR_ID YEAR_ID, max(distinct a11.DAY_DATE) WJXBFS1 from `LU_DAY` a11 group by a11.YEAR_ID
This is a known issue in Strategy 2020 and previous versions. Enabling the "Include Distinct Elements" setting causes Data Engine to incorrectly select the wrong data type for the metric column when creating a temporary table.

In the new fix, the correct data type is selected after removing unnecessary logic within Data Engine.
The report now can be executed successfully and correctly.

The SQL shows that the column is correctly selected as the correct data type:
create table TWIUELBZCMD000 ( YEAR_ID DECIMAL(38, 0), WJXBFS1 DATETIME) insert into TWIUELBZCMD000 select a11.YEAR_ID YEAR_ID, max(distinct a11.DAY_DATE) WJXBFS1 from `LU_DAY` a11 group by a11.YEAR_ID ...