Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15769 Support view creation in CBO
  3. HIVE-15845

create view on subquery_exists_having may not work well with unparseTranslator

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      On master,

      hive> create view v as select b.key, count(*)
          > from src b
          > group by b.key
          > having exists
          >   (select a.key
          >   from src a
          >   where a.key = b.key and a.value > 'val_9'
          >   );
      
      View Expanded Text: 	select `b`.`key`, count(*)
      	                    	from `default`.`src` `b`
      	                    	group by `b`.`key`
      	                    	having exists
      	                    	  (select `a`.`key`
      	                    	  from `default`.`src` `a`
      	                    	  where `a`.`key` = b.key and `a`.`value` > 'val_9'
      	                    	  )
      

      You can see that b.key is not quoted.

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            Unassigned Unassigned
            pxiong Pengcheng Xiong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: