We perform additional processing on some of our view definitions and we've found that in some cases Hive actually stores malformed representations of the original source SQL text definition of the view. We have examples where the stored original view text is in fact an unparsable statement. This prevents later processing of the view (recompiling for column adjustments for example) and is counter intuitive to the user.
Specifically the failure appears to be focused on the removal of necessary back-tick quoting from the original text on aliases (but possibly other identifiers).
Create a view that is subject to malformation:
Describe view definition to obtain original text:
Note that viewOriginalText value does not equal the text supplied on the first step, specifically `a.b` → a.b.
Executing viewOriginalText value results in failure: