Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-28057

Iceberg: Branches with non-lowercase characters can't be accessed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0
    • None

    Description

      Repo:

      1. Let's create a branch

      ALTER TABLE Devices CREATE Branch Sandbox

      2. Check the existence for evidence

      SELECT * FROM `default`.`devices`.`refs`;

      The References show it properly

       

       

      3. Select from branch

      SELECT * FROM default.Devices.branch_Sandbox;

      But if the select it would throw an exception:

      Error while compiling statement: FAILED: SemanticException Cannot use snapshotRef (does not exist): sandbox

      I guess the select operator does have a simple equals and does not check the cases also the cultureInvariant could be a different issue

      Exception

      INFO  : Compiling command(queryId=hive_20240205151156_891265b0-0d7c-49b6-892a-cc6f7574ed2b): SELECT * FROM default.Devices.branch_Sandbox
      ERROR : FAILED: SemanticException Cannot use snapshotRef (does not exist): sandbox
      org.apache.hadoop.hive.ql.parse.SemanticException: Cannot use snapshotRef (does not exist): sandbox
          at org.apache.iceberg.mr.hive.HiveIcebergStorageHandler.checkAndSetTableMetaRef(HiveIcebergStorageHandler.java:1017)
          at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1800)
          at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1710)
          at org.apache.hadoop.hive.ql.parse.CalcitePlanner.getTableObjectByName(CalcitePlanner.java:5657)
          at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:2362)
          at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:2309)
          at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genResolvedParseTree(SemanticAnalyzer.java:13295)
          at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:13403)
          at org.apache.hadoop.hive.ql.parse.CalcitePlanner.analyzeInternal(CalcitePlanner.java:482)
          at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:319)
          at org.apache.hadoop.hive.ql.Compiler.analyze(Compiler.java:227)
          at org.apache.hadoop.hive.ql.Compiler.compile(Compiler.java:108)
          at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:202)
          at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:656)
          at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:602)
          at org.apache.hadoop.hive.ql.Driver.compileAndRespond(Driver.java:596)
          at org.apache.hadoop.hive.ql.reexec.ReExecDriver.compileAndRespond(ReExecDriver.java:126)
          at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:209)
          at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork$1.run(SQLOperation.java:338)
          at java.base/java.security.AccessController.doPrivileged(Native Method)
          at java.base/javax.security.auth.Subject.doAs(Subject.java:423)
          at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1899)
          at org.apache.hive.service.cli.operation.SQLOperation$BackgroundWork.run(SQLOperation.java:360)
          at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)

      INFO  : Completed compiling command(queryId=hive_20240205151156_891265b0-0d7c-49b6-892a-cc6f7574ed2b); Time taken: 0.088 seconds

       

      Attachments

        1. image-2024-02-05-16-10-55-198.png
          33 kB
          Attila Turoczy

        Issue Links

          Activity

            People

              ayushtkn Ayush Saxena
              aturoczy Attila Turoczy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: