Is it possible to retrieve the last element in an array?
I can do:
datasetpathlist[0]
but
datasetpathlist[array_length(datasetpathlist)]
gives me this error:
org.apache.calcite.rex.RexCall cannot be cast to org.apache.calcite.rex.RexLiteral.
Is it possible to retrieve the last element in an array?
I can do:
datasetpathlist[0]
but
datasetpathlist[array_length(datasetpathlist)]
gives me this error:
org.apache.calcite.rex.RexCall cannot be cast to org.apache.calcite.rex.RexLiteral.
try sublist([array],-1,1)[0]
That worked, thank you! I don’t see sublist in the SQL reference – is there a list of undocumented functions somewhere?
source code in github