Hi,

I'm having an issue validating a query (using Calcite 1.8) with an order by statement that doesn't reference columns in the select clause. I'm sure the issue is mine in the meta processing but just wanted to confirm Calcite should support it.

Simplified example

create table test1 (field1 text, field2 text);

select field1,field2 from test1 order by field2;    ---- this works fine

select field1 from test1 order by field2; ---- this errors with a message like "org.apache.calcite.sql.validate.SqlValidatorException: Column 'field2' not found in any table"

Should this syntax be valid in Calcite?

thanks


Reply via email to