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

masking_12 qtest expects wrong inputs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • Query Planning, Test, Tests, Views
    • None

    Description

      It appears this qtest expects the wrong behavior, and should fail but doesn't.

      Below Queries 3 and 4 should not include default@src as Input 

      Query 1

      PREHOOK: query: create table `masking_test_subq_n1` as select cast(key as int) as key, value from src
      PREHOOK: type: CREATETABLE_AS_SELECT
      PREHOOK: Input: default@src
      PREHOOK: Output: database:default
      PREHOOK: Output: default@masking_test_subq_n1
      POSTHOOK: query: create table `masking_test_subq_n1` as select cast(key as int) as key, value from src
      POSTHOOK: type: CREATETABLE_AS_SELECT
      POSTHOOK: Input: default@src
      POSTHOOK: Output: database:default
      POSTHOOK: Output: default@masking_test_subq_n1
      POSTHOOK: Lineage: masking_test_subq_n1.key EXPRESSION [(src)src.FieldSchema(name:key, type:string, comment:default), ]
      POSTHOOK: Lineage: masking_test_subq_n1.value SIMPLE [(src)src.FieldSchema(name:value, type:string, comment:default), ]

      Query 2

      PREHOOK: query: create view `v1_n9` as select * from `masking_test_subq_n1`
      PREHOOK: type: CREATEVIEW
      PREHOOK: Input: default@masking_test_subq_n1
      PREHOOK: Output: database:default
      PREHOOK: Output: default@v1_n9
      POSTHOOK: query: create view `v1_n9` as select * from `masking_test_subq_n1`
      POSTHOOK: type: CREATEVIEW
      POSTHOOK: Input: default@masking_test_subq_n1
      POSTHOOK: Output: database:default
      POSTHOOK: Output: default@v1_n9
      POSTHOOK: Lineage: v1_n9.key SIMPLE [(masking_test_subq_n1)masking_test_subq_n1.FieldSchema(name:key, type:int, comment:null), ]
      POSTHOOK: Lineage: v1_n9.value SIMPLE [(masking_test_subq_n1)masking_test_subq_n1.FieldSchema(name:value, type:string, comment:null), ]
      

      Query 3 (the explain output here describes a TableScan on table src)

      PREHOOK: query: explain
      select * from `v1_n9`
      limit 20
      PREHOOK: type: QUERY
      PREHOOK: Input: default@masking_test_subq_n1
      PREHOOK: Input: default@src
      PREHOOK: Input: default@v1_n9
      #### A masked pattern was here ####
      POSTHOOK: query: explain
      select * from `v1_n9`
      limit 20
      POSTHOOK: type: QUERY
      POSTHOOK: Input: default@masking_test_subq_n1
      POSTHOOK: Input: default@src
      POSTHOOK: Input: default@v1_n9
      

      Query 4

      PREHOOK: query: select * from `v1_n9`
      limit 20
      PREHOOK: type: QUERY
      PREHOOK: Input: default@masking_test_subq_n1
      PREHOOK: Input: default@src
      PREHOOK: Input: default@v1_n9
      #### A masked pattern was here ####
      POSTHOOK: query: select * from `v1_n9`
      limit 20
      POSTHOOK: type: QUERY
      POSTHOOK: Input: default@masking_test_subq_n1
      POSTHOOK: Input: default@src
      POSTHOOK: Input: default@v1_n9
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            klcopp Karen Coppage
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: