Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.3.0
-
None
-
None
Description
consider
create table TAB_PART (a int, b int) partitioned by (p string) clustered by (a) into 2 buckets stored as orc TBLPROPERTIES ('transactional'='true') select a from TAB_PART where p = 'blah'
If the table is truly empty (exactly as above) then DbLockManger will acquire SHARED_READ lock on the table (for the select stmt)
If prior to Select, one runs "alter table TAB_PART add partition (p = 'blah')" then 2 SHARED_LOCKS are acquired: 1 on table and 1 on partition.
Should only get 1 partition level lock.
The behavior of lock manager is such because the generated query plan creates ReadEntity objects this way.
Todo: try actually inserting data and see if that changes anything.