I wrote a spark job which registers a temp table and when I expose it via beeline (JDBC client)
$ ./bin/beeline beeline> !connect jdbc:hive2://IP:10003 -n
hive.server2.enable.doAs true
Also if you want user ABC to impersonate all(*), add below properties to your core-site.xml
hadoop.proxyuser.ABC.groups * hadoop.proxyuser.ABC.hosts *