Github user sohami commented on the issue:
https://github.com/apache/drill/pull/1076
Filtering should be done based on impersonated user which will be stored in
UserSession as well. So your check
[here](https://github.com/kkhatua/drill/blob/66ab15df7e0df6804b1938adc048728c7436450b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/BitToUserConnectionIterator.java#L81)
is fine.
But we shouldn't display the [target
User](https://github.com/kkhatua/drill/blob/66ab15df7e0df6804b1938adc048728c7436450b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/BitToUserConnectionIterator.java#L123)
separately in the table. Just displaying the session user is fine which will
be same as querying user. Because when we do `session.getTargetUserName()` it
get's the target name which was passed in Connection URL during connection
time. But during query time the actual targeted user or the session user can
change.
---