Fully managed cloud. 30-day FREE full featured trial. Start Now
cancel
Showing results for 
Search instead for 
Did you mean: 

Java UDF retrieve column name

flo1
Padawan

Hi all,

I have a Java UDF with Dynamic Input and Output Parameters.

When executing the following query, the Java function getInputColumnName(0) within the UDF returns "1".

SELECT JavaUDF(id, colA, colB) FROM table;

 

Is it possible to retrieve the real column name "id" instead of "1" within the UDF?

 

 

1 REPLY 1

exa-Aleksandr
Team Exasol
Team Exasol

Hi @flo1 ,

DB calculates expression before passing it to UDF.

Therefore, only parameter's value is available.

It is hardly possible to implement such kind of UDFs in a different way, because in SQL you can pass arbitrary expressions as arguments:

 

SELECT JavaUDF(id, colA, colB) FROM table;

SELECT JavaUDF(42, colA, colB) FROM table;

SELECT JavaUDF(41+1, colA, colB) FROM table;