microsoft / Spark-Hive-Tools

This is for issue/feedback tracking on Spark & Hive Tools
Creative Commons Attribution 4.0 International
6 stars 9 forks source link

'Cannot Recognize Input' in Valid Code #9

Open IAmTheNeil opened 4 years ago

IAmTheNeil commented 4 years ago

Hi team,

I’m experiencing an issue in v1.1.7: There are instances where it flags a 'problem' within a hive (HQL) file, despite the code being fully functional and valid.

For example:

image

image

Here the extension’s having problems parsing the line: SET hivevar:as_of_dt = TO_DATE('2019-12-31’);

…though it's unclear why. Possibly due to the fact it’s following a variable declaration, but that’s a valid line of code, which functions without issue on execution.

I’ve also tried swapping the TO_DATE function for CAST('2019-12-31' AS DATE), but unfortunately, the issue remains the same.

Please take a look and advise. Thank you.