ternary expression support, subselect enhancement