[ https://issues.apache.org/jira/browse/HIVE-18060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16386242#comment-16386242 ]
Oleksiy Sayankin commented on HIVE-18060: ----------------------------------------- Well the only thing I need here is how to obtain q.out file for the test (expected output). The rest is rather simple: STR above is an ideal test-case. Do you know about that? I will appreciate your help and then add the test-case. > UpdateInputAccessTimeHook fails for non-current database > -------------------------------------------------------- > > Key: HIVE-18060 > URL: https://issues.apache.org/jira/browse/HIVE-18060 > Project: Hive > Issue Type: Bug > Reporter: Oleksiy Sayankin > Assignee: Oleksiy Sayankin > Priority: Major > Fix For: 3.0.0 > > Attachments: HIVE-18060.1.patch > > > Steps to reproduce: > *STEP 1. Create DBs and tables* > {code} > hive> create database temp; > hive> use temp; > hive> create table test(id int); > hive> create database temp2; > hive> use temp2; > hive> create table test2(id int); > {code} > *STEP 2. Set {{hive.exec.pre.hooks}}* > {code} > hive> set > hive.exec.pre.hooks=org.apache.hadoop.hive.ql.hooks.UpdateInputAccessTimeHook$PreExec; > {code} > *STEP 3. Use {{desc}}* > {code} > hive> use temp; > hive> desc temp2.test2; > {code} > *EXPECTED RESULT* > Code works fine and shows table info > *ACTUAL RESULT* > {code} > FAILED: Hive Internal Error: > org.apache.hadoop.hive.ql.metadata.InvalidTableException(Table not found > test2) > org.apache.hadoop.hive.ql.metadata.InvalidTableException: Table not found > test2 > at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1258) > at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1209) > at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:1196) > at > org.apache.hadoop.hive.ql.hooks.UpdateInputAccessTimeHook$PreExec.run(UpdateInputAccessTimeHook.java:61) > at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1688) > at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1454) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1172) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1162) > at > org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:234) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:185) > at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:401) > at > org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:791) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:729) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:652) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:647) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.apache.hadoop.util.RunJar.run(RunJar.java:221) > at org.apache.hadoop.util.RunJar.main(RunJar.java:136) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)