It is not allowed in ansi and is incorrect syntax which is
why a syntax error is returned.
But we allow it in special mode. This was done for compatibility
with non-ansi syntax.
>>cqd mode_special_4 'ON';
--- SQL operation complete.
>>
>>select * from (select * from t order by
Ming,
I agree that a better error message would always be better. The parser
essentially stops when it encounters an error / unexpected syntax. One could
imagine a parser that keeps going and realigns itself to valid syntax that it
finds again. Then it could potentially call out that
Thanks Rohit,
That is good to know, after think it again, yes, this is wrong in the first
place. I tested in Hive, it doesn’t support that syntax either, but seems some
RDBMS (Oracle, DB2) allow this syntax but ignore it.
However, It will be more user friendly that optimizer or parser simply