Always allow unquoted keywords as column names #539
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request, and why are they necessary?
This PR is a follow up to #503 and fixes #534. During integration testing with a Trino environment, the instantiation of the new
HiveConf
object threwfailure to login: javax.security.auth.login.LoginException: java.lang.NullPointerException: invalid null input: name
. This is due to the false assumption for the presence of Hive configuration files such ashive-site.xml
in Trino environments, whichnew HiveConf()
will try to look for. This PR fixes this false assumption by removingnew HiveConf()
and forces leniency for unquote keyword columns when parsing hive views. A long term solution will involve an engine-agnostic KV config map used ubiquitously across coral.How was this patch tested?
testUnquotedKeywordAsColumnName
passes whenuseSQL11ReservedKeywordsForIdentifier
returns true and fails whenuseSQL11ReservedKeywordsForIdentifier
returns false