Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.6.0
-
None
-
None
Description
Copied from the original comment:
If you do CREATE VIEW v(x,y) AS SELECT a+1,b+2 FROM t
then we'll store the expanded view def as SELECT `_c0` AS `x`,`_c1` AS `y` FROM (SELECT `t`.`a`+1,`t`.`b`+2 FROM `t`) `v`
As a result, if hive ever changes its convention for generating anonymous expression names (_c0, _c1, ...), such stored view definitions will break.
The only way I can think of to avoid this is to implement SQL:200n's column-alias-by-position construct , e.g.
(SELECT `t`.`a`+1,`t`.`b`+2 FROM `t`) AS `v`(`x`,`y`)
(similar to what was done for LATERAL VIEW).
Attachments
Issue Links
- relates to
-
HIVE-972 Support views
- Closed