Hello everyone,
I am currently working with a SQL Warehouse and have been getting the following error message:
[INTERNAL_ERROR ] The Spark SQL phase planning failed with an internal error. You hit a bug in Spark or the Spark plugins you use. Please, report this bug to the corresponding communities or vendors, and provide the full stack trace. SQLSTATE: XX000
I get said message when using a SQL table function created by myself in conjunction with a table. I am using 2 different queries trying to get any results, but both queries return the same error. The queries used are:
SELECT *
FROM mytable A
LEFT JOIN lateral myfunction(A.column1, A.column2) B ON TRUE
SELECT *
FROM mytable A
CROSS JOIN LATERAL (
SELECT *
FROM myfunction(A.column1, A.column2)
) AS B;
Does anyone know how to use a tabular table whose parameters are passed from a table's column?
PS: the tabular function works perfectly when used directly select * from myfunction(1, 2)
Thanks in advance!