select cast(k1 as INT) as id from tbl1 order by id limit 2; is not valid for topN optimization, because 'id' is a cast expr not a table column from scan node. This pr address this issue.
select cast(k1 as INT) as id from tbl1 order by id limit 2; is not valid for topN optimization, because 'id' is a cast expr not a table column from scan node. This pr address this issue.