ArcadeDB Server v25.11.1 (build 522241f606696c3cf24711298c58cc9c1483fb1d/1765311329530/UNKNOWN)
Running on Linux 6.14.0-37-generic - OpenJDK 64-Bit Server VM 21.0.8
The return value of the distinct special function can not be used further. Given the example:
SELECT distinct(*) FROM (SELECT expand([1,2,3,1]) AS x)
The following variants result in an error:
SELECT first(distinct(*)) FROM (SELECT expand([1,2,3,1]) AS x)
SELECT distinct(*).type() FROM (SELECT expand([1,2,3,1]) AS x)
The error is:
Unknown function name 'distinct'
If the error is happen on purpose because of the special nature of distinct the error message should be rephrased.