-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Description
The Hive view is defined as
CREATE VIEW v1 AS SELECT NULL AS c1 FROM t
When using it in Trino it throws an error
Unknown type 'NULL' for column 'c1' in view: hive.default.v1
It looks like Hive has the type void for NULL, while Trino doesn't and still enforces a type for every column.
A workaround is to modify the Hive view definition by adding an explicit cast (to whatever valid type in both Hive and Trino)
CREATE VIEW v1 AS SELECT CAST(NULL AS INT) AS c1 FROM t
This will be accepted by Trino and still works in Hive.
Regarding the translation from Hive to Trino, does it make sense to convert a plain NULL column into a CAST?
Metadata
Metadata
Assignees
Labels
No labels