Skip to content

Conversation

findinpath
Copy link
Contributor

Description

Older version of HMS are more permissive in terms of names allowed for schemas/tables. Disallow directly in Trino object names that may eventually cause inaccuracies in the location of the schema/table saved in HMS.

Additional context and related issues

Release notes

(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Jun 7, 2023
@findinpath findinpath added the no-release-notes This pull request does not require release notes entry label Jun 7, 2023
@github-actions github-actions bot added hive Hive connector tests:hive labels Jun 7, 2023
Copy link
Member

@hashhar hashhar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens to reads on existing "invalid" names?

@findinpath
Copy link
Contributor Author

what happens to reads on existing "invalid" names?

The existing object names, regardless whether they are valid or not valid (e.g. : "foo/bar" name) will be passed further to HMS as they are.
The current PR avoids filling potentially problematic object names in HMS which would lead to inconsistencies in the path of the schema / table.

@findepi
Copy link
Member

findepi commented Jun 12, 2023

is ci / test (plugin/trino-hive) failure related?

Older version of HMS are more permissive in terms of names
allowed for schemas/tables. Disallow directly in Trino object
names that may eventually cause inaccuracies in the location
of the schema/table saved in HMS.
@findinpath findinpath force-pushed the findinpath/hms-check-object-name-validity branch from aa47b5e to 2f41575 Compare June 12, 2023 20:44
@findinpath
Copy link
Contributor Author

is ci / test (plugin/trino-hive) failure related?

TestHive3OnDataLake>BaseTestHiveOnDataLake.testCreateTableInvalidName:1675 
Expecting throwable message:
  "Invalid object name: '.'"
to contain:
  "Invalid table name"
but did not.

I think the failure is caused by the fact that this code depends on #17787 changes. Rebased on master.

@findinpath findinpath requested a review from findepi June 13, 2023 06:49
@findepi findepi merged commit 63debf0 into trinodb:master Jun 13, 2023
@github-actions github-actions bot added this to the 420 milestone Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed hive Hive connector no-release-notes This pull request does not require release notes entry
Development

Successfully merging this pull request may close these issues.

3 participants