fix issues in Optiq to Hive AST conversion