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

Needs to capture input/output entities in explain



    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0, 3.2.0, 3.1.1, 2.3.4
    • Component/s: None
    • Labels:
    • Target Version/s:
    • Hadoop Flags:


      With Sentry enabled, commands like explain drop table foo fail with explain drop table foo;

      Error: Error while compiling statement: FAILED: SemanticException No valid privileges
       Required privilege( Table) not available in input privileges
       The required privileges: (state=42000,code=40000)

      Sentry fails to authorize because the ExplainSemanticAnalyzer uses an instance of DDLSemanticAnalyzer to analyze the explain query.

      BaseSemanticAnalyzer sem = SemanticAnalyzerFactory.get(conf, input);
      sem.analyze(input, ctx);

      The inputs/outputs entities for this query are set in the above code. However, these are never set on the instance of ExplainSemanticAnalyzer itself and thus is not propagated into the HookContext in the calling Driver code.

      sem.analyze(tree, ctx); --> this results in calling the above code that uses DDLSA
      hookCtx.update(sem); --> sem is an instance of ExplainSemanticAnalyzer, this code attempts to update the HookContext with the input/output info from ESA which is never set.


        1. HIVE-18778.1.patch
          4 kB
          Jianyong Dai
        2. HIVE-18778.2.patch
          4 kB
          Jianyong Dai
        3. HIVE-18778-SparkPositive.patch
          1.24 MB
          Naveen Gangam
        4. HIVE-18788_SparkNegative.patch
          2 kB
          Naveen Gangam
        5. HIVE-18788_SparkPerf.patch
          104 kB
          Naveen Gangam
        6. HIVE-18778.3.patch
          1.34 MB
          Naveen Gangam
        7. HIVE-18778_TestCliDriver.patch
          1.67 MB
          Jianyong Dai
        8. HIVE-18778.4.patch
          4 kB
          Jianyong Dai
        9. HIVE-18778.5.patch
          5.41 MB
          Jianyong Dai
        10. HIVE-18778.6.patch
          5.38 MB
          Jianyong Dai
        11. HIVE-18778.7.patch
          7.30 MB
          Jianyong Dai
        12. HIVE-18778.8.patch
          7.40 MB
          Jianyong Dai
        13. HIVE-18778.9.patch
          7.44 MB
          Jianyong Dai
        14. HIVE-18778.9.branch-3.patch
          6.93 MB
          Jianyong Dai
        15. HIVE-18778.10.branch-3.patch
          7.18 MB
          Jianyong Dai
        16. HIVE-18778.11.branch-3.patch
          7.18 MB
          Jianyong Dai
        17. HIVE-18778.11.branch-3.1.patch
          6.63 MB
          Jianyong Dai
        18. HIVE-18778.12.branch-3.1.patch
          7.06 MB
          Jianyong Dai
        19. HIVE-18778.1.branch-2.patch
          2 kB
          Jianyong Dai
        20. HIVE-18778.2.branch-2.patch
          2 kB
          Jianyong Dai
        21. HIVE-18778.3.branch-2.patch
          2 kB
          Jianyong Dai

          Issue Links



              • Assignee:
                daijy Jianyong Dai
                daijy Jianyong Dai
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created: