We are getting the following error when running a query on hana database
SAP DBTech JDBC: [2048]: column store error: search table error: [6861] Error during compiling regular expression
Comments
26 Dec 2016 12:06 pm Sonia Barwar Helpful Answer
You are getting this programming error because SAP HANA DATETIME functions cannot be handled correctly while optimize the query, when a comparsion of date with another partial date is performed.
Eg:
drop table t1; create column table t1 (a datetime); insert into t1 values ('2016-01-01');
select 1 from t1 where MONTH(a) = MONTH(current_timestamp);
Follwoing datetime functions are affected by this bug:
HOUR, MINUTE, MONTH, DAYOFMONTH, EXTRACT(DAY FROM timestamp), EXTRACT(MONTH FROM timestamp), EXTRACT(HOUR FROM timestamp), EXTRACT(MINUTE FROM timestamp)
26 Dec 2016 12:15 pm Romil Tripathi Helpful Answer
This issue will solved soon with the upcoming hana revision, for now you can try to replace the function with SUBSTR().
You can use substr(X, 6, 2) instead of MONTH, for date-format YYYY-MM-DD.
You are getting this programming error because SAP HANA DATETIME functions cannot be handled correctly while optimize the query, when a comparsion of date with another partial date is performed.
Eg:
drop table t1;
create column table t1 (a datetime);
insert into t1 values ('2016-01-01');
select 1 from t1 where MONTH(a) = MONTH(current_timestamp);
Follwoing datetime functions are affected by this bug:
HOUR, MINUTE, MONTH, DAYOFMONTH, EXTRACT(DAY FROM timestamp), EXTRACT(MONTH FROM timestamp), EXTRACT(HOUR FROM timestamp), EXTRACT(MINUTE FROM timestamp)