I am trying to split a string with semicolon using the below query. In Beeline, Its thrwing me Parse execption error. But in Hive its working fine. I am properly escaping the semicolan in my query. Below is my query.
select split(fieldname,'\;') from table name
I also tried
select split(fieldname,'\\;') from table name
I also tried with double quotes. But Nothing is working in Beeline shell. But in Hive shell, no issues. Query is running fine.
Beeline is throwing below error
Error: Error while compiling statement: FAILED: ParseException line 1:29 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in select expression (state=42000,code=40000)
Kindly let me know the proper way to escape the semi colans.
It really works after replacing ';' with '\073' !
I met this problem when using split and ';' in crontab hql, it returns " ParseException line 3:121 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in select expression".
Please use backtick for column name and it will treat all characters in the field literally
Table names and column names are case insensitive.
`) is treated literally. Within a backtick string, use double backticks (
``) to represent a backtick character.
it's not only an issue with split, also with eg concat. escaping a semicolon in hue works fine but beeline errors with the same error as above.
Replacing the semicolon with \073 works here as well.