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

Needs to capture input/output entities in explainRewrite

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Authorization
    • None

    Description

      HIVE-18778(CVE-2018-1314) capture input/output entitles in explain semantic analyzer so when a query is disallowed by Ranger, Sentry or Sqlstd authorizizer, the corresponding explain statement will be disallowed either.

      However, ExplainSQRewriteSemanticAnalyzer also uses an instance of DDLSemanticAnalyzer to analyze the explain rewrite query.

      SemanticAnalyzer sem = (SemanticAnalyzer)
       SemanticAnalyzerFactory.get(queryState, input);
      sem.analyze(input, ctx);
      sem.validate();

       

      The inputs/outputs entities for this query are never set on the instance of ExplainSQRewriteSemanticAnalyzer itself and thus is not propagated into the HookContext in the calling Driver code. It is a similar issue to HIVE-18778.

      Attachments

        1. HIVE-23461.3.patch
          8 kB
          Naresh P R
        2. HIVE-23461.2.patch
          8 kB
          Naresh P R
        3. HIVE-23461.1.patch
          8 kB
          Naresh P R
        4. HIVE-23461.patch
          8 kB
          Naresh P R

        Activity

          People

            nareshpr Naresh P R
            1wc Wenchao Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: