Yikf commented on issue #5878:
URL: https://github.com/apache/kyuubi/issues/5878#issuecomment-1866229932

   Hi @wardlican , the distribution runable I compiled from [branch 
1.6](https://github.com/apache/kyuubi/tree/branch-1.6) and copy 
`hiveserver2-site.xml` config items to `hive-site.xml` does not reproduce your 
problem.
   
   user `yikaifei2` has MASKING policy
   ```
   0: jdbc:hive2://xxx:1> select * from default.t2;
   2023-12-21 21:10:48.322 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei2's query[a0d00946-761a-4c8a-89fd-554df75df175]: 
PENDING_STATE -> RUNNING_STATE, statement:
   select * from default.t2
   2023-12-21 21:10:48.323 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Query[a0d00946-761a-4c8a-89fd-554df75df175] in FINISHED_STATE
   2023-12-21 21:10:48.324 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei2's query[a0d00946-761a-4c8a-89fd-554df75df175]: 
RUNNING_STATE -> FINISHED_STATE, time taken: 0.002 seconds
   +----------------------------------------------------+
   |                      t2.name                       |
   +----------------------------------------------------+
   | c2ad66ef155d00ff0d8f1163f04c24148d93e07d2c78200672f416bb3a183c52 |
   +----------------------------------------------------+
   1 row selected (0.134 seconds)
   0: jdbc:hive2://xxx:1> select current_user();
   2023-12-21 21:11:29.665 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei2's query[aab12815-413d-4ccd-85aa-f71ff0e30de2]: 
PENDING_STATE -> RUNNING_STATE, statement:
   select current_user()
   2023-12-21 21:11:29.667 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Query[aab12815-413d-4ccd-85aa-f71ff0e30de2] in FINISHED_STATE
   2023-12-21 21:11:29.667 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei2's query[aab12815-413d-4ccd-85aa-f71ff0e30de2]: 
RUNNING_STATE -> FINISHED_STATE, time taken: 0.001 seconds
   +------------+
   |    _c0     |
   +------------+
   | yikaifei2  |
   +------------+
   1 row selected (0.092 seconds)
   0: jdbc:hive2://yq01-rdw-dev.yq01.baidu.com:1>
   ```
   
   user `yikaifei` has no MASKING policy
   ```
   0: jdbc:hive2://xxx:1> select current_user();
   2023-12-21 21:11:48.081 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei's query[56e71aa0-57ba-43e4-baf1-834177d62085]: 
PENDING_STATE -> RUNNING_STATE, statement:
   select current_user()
   2023-12-21 21:11:48.082 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Query[56e71aa0-57ba-43e4-baf1-834177d62085] in FINISHED_STATE
   2023-12-21 21:11:48.083 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei's query[56e71aa0-57ba-43e4-baf1-834177d62085]: 
RUNNING_STATE -> FINISHED_STATE, time taken: 0.002 seconds
   +-----------+
   |    _c0    |
   +-----------+
   | yikaifei  |
   +-----------+
   1 row selected (0.175 seconds)
   0: jdbc:hive2://xxx:1> select * from default.t2;
   2023-12-21 21:11:49.906 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei's query[369aae55-d4fe-4912-9120-658d8963f2e6]: 
PENDING_STATE -> RUNNING_STATE, statement:
   select * from default.t2
   2023-12-21 21:11:49.908 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Query[369aae55-d4fe-4912-9120-658d8963f2e6] in FINISHED_STATE
   2023-12-21 21:11:49.908 INFO org.apache.kyuubi.operation.ExecuteStatement: 
Processing yikaifei's query[369aae55-d4fe-4912-9120-658d8963f2e6]: 
RUNNING_STATE -> FINISHED_STATE, time taken: 0.001 seconds
   +-----------------+
   |     t2.name     |
   +-----------------+
   | heiheihahadasd  |
   +-----------------+
   1 row selected (0.078 seconds)
   0: jdbc:hive2://xxx:1>
   ```
   
   for user `yikaifei2`,  the value of `t2.name` is hashed.
   
   
![image](https://github.com/apache/kyuubi/assets/51110188/2b27e760-5b34-470c-ab33-5bc2a63f3b02)
   
   
   I think that you should check the plugin wether was been enabled. you can 
view the ranger ui plugin status page or the local policy cache directory.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to