[ https://issues.apache.org/jira/browse/HIVE-16788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16029955#comment-16029955 ]
Hive QA commented on HIVE-16788: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12870413/HIVE-16788.patch {color:green}SUCCESS:{color} +1 due to 1 test(s) being added or modified. {color:red}ERROR:{color} -1 due to 4 failed/errored test(s), 10790 tests executed *Failed tests:* {noformat} org.apache.hadoop.hive.cli.TestBeeLineDriver.testCliDriver[create_merge_compressed] (batchId=237) org.apache.hadoop.hive.cli.TestBeeLineDriver.testCliDriver[materialized_view_create_rewrite] (batchId=237) org.apache.hadoop.hive.cli.TestMiniLlapLocalCliDriver.testCliDriver[subquery_scalar] (batchId=152) org.apache.hadoop.hive.ql.security.TestMultiAuthorizationPreEventListener.org.apache.hadoop.hive.ql.security.TestMultiAuthorizationPreEventListener (batchId=219) {noformat} Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/5476/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/5476/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-5476/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 4 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12870413 - PreCommit-HIVE-Build > ODBC call SQLForeignKeys leads to NPE if you use PK arguments rather than FK > arguments > -------------------------------------------------------------------------------------- > > Key: HIVE-16788 > URL: https://issues.apache.org/jira/browse/HIVE-16788 > Project: Hive > Issue Type: Bug > Components: ODBC > Reporter: Carter Shanklin > Assignee: Jesus Camacho Rodriguez > Attachments: HIVE-16788.patch > > > This ODBC call is meant to allow you to determine FK relationships either > from the PK side or from the FK side. > Hive only allows you to traverse from the FK side, trying it from the PK side > leads to an NPE. > Example using the table "customer" from TPC-H with FKs defined in Hive: > {code} > === Foreign Keys === > Using table as foreign source > (u'HIVE', u'tpch_bin_flat_orc_2', u'nation', u'n_nationkey', u'HIVE', > u'tpch_bin_flat_orc_2', u'customer', u'c_nationkey', 1, 0, 0, u'custome > r_c2', u'nation_c1', 0) > Not using table as foreign source > Got an error from the server for customer! > {code} > Compare: Postgres > {code} > === Foreign Keys === > Using table as foreign source > (u'vagrant', u'public', u'nation', u'n_nationkey', u'vagrant', u'public', > u'customer', u'c_nationkey', 1, 3, 3, u'customer_c_nationkey_fkey', > u'nation_pkey', 7) > Not using table as foreign source > (u'vagrant', u'public', u'customer', u'c_custkey', u'vagrant', u'public', > u'orders', u'o_custkey', 1, 3, 3, u'orders_o_custkey_fkey', u'customer_pkey', > 7) > {code} > Note that Postgres allows traversal from either way. The traceback you get in > the HS2 logs is this: > {code} > 2016-12-04T21:08:55,398 ERROR [8998ca98-9940-49f8-8833-7c6ebd8c96a2 > HiveServer2-Handler-Pool: Thread-53] metastore.RetryingHMSHandler: MetaEx > ception(message:java.lang.NullPointerException) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newMetaException(HiveMetaStore.java:5785) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_foreign_keys(HiveMetaStore.java:6474) > 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.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:140) > at > org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:99) > at com.sun.proxy.$Proxy25.get_foreign_keys(Unknown Source) > at > org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getForeignKeys(HiveMetaStoreClient.java:1596) > 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.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:154) > at com.sun.proxy.$Proxy26.getForeignKeys(Unknown Source) > at > org.apache.hive.service.cli.operation.GetCrossReferenceOperation.runInternal(GetCrossReferenceOperation.java:128) > at > org.apache.hive.service.cli.operation.Operation.run(Operation.java:324) > at > org.apache.hive.service.cli.session.HiveSessionImpl.getCrossReference(HiveSessionImpl.java:933) > at > org.apache.hive.service.cli.CLIService.getCrossReference(CLIService.java:411) > at > org.apache.hive.service.cli.thrift.ThriftCLIService.GetCrossReference(ThriftCLIService.java:738) > at > org.apache.hive.service.rpc.thrift.TCLIService$Processor$GetCrossReference.getResult(TCLIService.java:1617) > at > org.apache.hive.service.rpc.thrift.TCLIService$Processor$GetCrossReference.getResult(TCLIService.java:1602) > at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) > at > org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56) > at > org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.lang.NullPointerException > at > org.apache.hive.common.util.HiveStringUtils.normalizeIdentifier(HiveStringUtils.java:919) > at > org.apache.hadoop.hive.metastore.ObjectStore$GetHelper.<init>(ObjectStore.java:2722) > at > org.apache.hadoop.hive.metastore.ObjectStore$GetListHelper.<init>(ObjectStore.java:2863) > at > org.apache.hadoop.hive.metastore.ObjectStore$11.<init>(ObjectStore.java:8455) > at > org.apache.hadoop.hive.metastore.ObjectStore.getForeignKeysInternal(ObjectStore.java:8455) > at > org.apache.hadoop.hive.metastore.ObjectStore.getForeignKeys(ObjectStore.java:8445) > 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.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:101) > at com.sun.proxy.$Proxy24.getForeignKeys(Unknown Source) > at > org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_foreign_keys(HiveMetaStore.java:6465) > ... 28 more > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)