SELECT 4 TIME_ID
,STOCK_ID
,MAX(CASE WHEN TIME_ID BETWEEN 4 - 1597 + 1 AND 4 - 1 + 1 THEN VAR12 ELSE null END) MAX_VAR12_1M_1597M
FROM (
SELECT *
FROM VAR1_TMP_BOOK_INFO
WHERE TIME_ID BETWEEN 4 - 17711 + 1
AND 4
) VAR1_TMP_BOOK_INFO
JOIN (
SELECT stock_id stock_id1
,time_id time_id1
,seconds_in_bucket seconds_in_bucket1
,LAG(VAR1, 1) OVER (
PARTITION BY stock_id
,time_id ORDER BY seconds_in_bucket
) VAR1_LAG
FROM VAR1_TMP_BOOK_INFO
WHERE TIME_ID BETWEEN 4 - 1
AND 4
) VAR1_TMP_BOOK_INFO_1 ON VAR1_TMP_BOOK_INFO.stock_id = VAR1_TMP_BOOK_INFO_1.stock_id1
AND VAR1_TMP_BOOK_INFO.time_id = VAR1_TMP_BOOK_INFO_1.time_id1
AND VAR1_TMP_BOOK_INFO.seconds_in_bucket = VAR1_TMP_BOOK_INFO_1.seconds_in_bucket1
GROUP BY STOCK_ID
then it raises error
RunExecuteGraphError: [RunExecuteGraph Error] Ral failure at: /opt/conda/envs/rapids/conda-bld/blazingsql_1623363481746/work/engine/src/Interpreter/interpreter_cpp.cu:330: Operations between literals is not supported
If I remove condition in agg, it works:
SELECT 4 TIME_ID
,STOCK_ID
,MAX(CASE WHEN 1=1 THEN VAR12 ELSE null END) MAX_VAR12_1M_1597M
FROM (
SELECT *
FROM VAR1_TMP_BOOK_INFO
WHERE TIME_ID BETWEEN 4 - 17711 + 1
AND 4
) VAR1_TMP_BOOK_INFO
JOIN (
SELECT stock_id stock_id1
,time_id time_id1
,seconds_in_bucket seconds_in_bucket1
,LAG(VAR1, 1) OVER (
PARTITION BY stock_id
,time_id ORDER BY seconds_in_bucket
) VAR1_LAG
FROM VAR1_TMP_BOOK_INFO
WHERE TIME_ID BETWEEN 4 - 1
AND 4
) VAR1_TMP_BOOK_INFO_1 ON VAR1_TMP_BOOK_INFO.stock_id = VAR1_TMP_BOOK_INFO_1.stock_id1
AND VAR1_TMP_BOOK_INFO.time_id = VAR1_TMP_BOOK_INFO_1.time_id1
AND VAR1_TMP_BOOK_INFO.seconds_in_bucket = VAR1_TMP_BOOK_INFO_1.seconds_in_bucket1
GROUP BY STOCK_ID
or if I remove join table it also works:
SELECT 4 TIME_ID
,STOCK_ID
,MAX(CASE WHEN TIME_ID BETWEEN 4 - 1597 + 1 AND 4 - 1 + 1 THEN VAR12 ELSE null END) MAX_VAR12_1M_1597M
FROM (
SELECT *
FROM VAR1_TMP_BOOK_INFO
WHERE TIME_ID BETWEEN 4 - 17711 + 1
AND 4
) VAR1_TMP_BOOK_INFO
GROUP BY STOCK_ID
When I process this sql:
then it raises error
If I remove condition in agg, it works:
or if I remove join table it also works:
The source table likes that: