added more codegen for scalar expr