Describe the bug
After the changes implemented in #1146 what previously worked: passing a backtick-quoted value, now breaks with INVALID_SET_SYNTAX as the identifier ends up double-quoted.
To Reproduce
Call setCatalog or setSchema with a value wrapped in backticks like
and then use the connection. It fails with:
org.apache.hive.service.cli.HiveSQLException: Error running query: [INVALID_SET_SYNTAX] org.apache.spark.sql.catalyst.parser.ParseException:
[INVALID_SET_SYNTAX] Expected format is 'SET', 'SET key', or 'SET key=value'. If you want to include special characters in key, or include semicolon in value, please use backquotes, e.g., SET `key`=`value`. SQLSTATE: 42000
== SQL (line 1, position 1) ==
SET CATALOG ``foo-bar``
Expected behavior
The identifier should not end up being double quoted. This worked fine on driver version 2.7.6 and older.
Client Environment (please complete the following information):
- OS Linux
- Java version Java 21
- Java vendor OpenJDK
- Driver Version 3.3.3
Additional context
The changes implemented in #1146 do not properly support already backticked values. If the value is already backticked (which I believe is a valid case as per the Naming section of the docs), it should prevent wrapping it again.
Describe the bug
After the changes implemented in #1146 what previously worked: passing a backtick-quoted value, now breaks with
INVALID_SET_SYNTAXas the identifier ends up double-quoted.To Reproduce
Call
setCatalogorsetSchemawith a value wrapped in backticks likeand then use the connection. It fails with:
Expected behavior
The identifier should not end up being double quoted. This worked fine on driver version 2.7.6 and older.
Client Environment (please complete the following information):
Additional context
The changes implemented in #1146 do not properly support already backticked values. If the value is already backticked (which I believe is a valid case as per the Naming section of the docs), it should prevent wrapping it again.