Skip to content

Trailing slash issue in Hive Metastore database paths while creating table #14296

@Rajeev-01

Description

@Rajeev-01

Apache Iceberg version

1.9.2

Query engine

None

Please describe the bug 🐞

Summary

  • While we are creating a new table in hive, if location hasn't passed explicitly we are fetching database path from HMS and appending "/" followed by tableName.
  • There are no checks if the HMS db path has trailing slashes.
  • This ended up in creating the metadata files with the incorrect location which contains the double slashes.
  • This is a potential issue, since in metadata, location will be incorrect but the snapshot files will be under the path without multiple slashes.
  • While rewriting we won't able to overwrite to the correct prefix since the location is incorrect with multiple slashes.

Willingness to contribute

  • I can contribute a fix for this bug independently
  • I would be willing to contribute a fix for this bug with guidance from the Iceberg community
  • I cannot contribute a fix for this bug at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions