When we pull up constants through Union or Sort operators, we might end up rewriting the original expression into an expression whose schema has different nullability properties for some of its columns.
This results in AssertionError of the following kind:
... org.apache.hive.service.cli.HiveSQLException: Error running query: java.lang.AssertionError: Internal error: Cannot add expression of different type to set: ...
- is required by
HIVE-13807 Extend metadata provider to pull up predicates through Union