[ 
https://issues.apache.org/jira/browse/HIVE-23935?focusedWorklogId=504423&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-504423
 ]

ASF GitHub Bot logged work on HIVE-23935:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/Oct/20 09:30
            Start Date: 24/Oct/20 09:30
    Worklog Time Spent: 10m 
      Work Description: ashish-kumar-sharma commented on a change in pull 
request #1605:
URL: https://github.com/apache/hive/pull/1605#discussion_r511362503



##########
File path: 
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
##########
@@ -1124,6 +1125,40 @@ public void testEmptyTrustStoreProps() {
     setAndCheckSSLProperties(true, "", "", "jks");
   }
 
+  /**
+   * Tests getPrimaryKeys() when db_name isn't specified.
+   */
+  @Test
+  public void testGetPrimaryKeys() throws Exception {

Review comment:
       You are right that its part of ObjectStore but TestPrimaryKey class was 
created so that we can have all sort of test for primary key in one place.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 504423)
    Time Spent: 1h 50m  (was: 1h 40m)

> Fetching primaryKey through beeline fails with NPE
> --------------------------------------------------
>
>                 Key: HIVE-23935
>                 URL: https://issues.apache.org/jira/browse/HIVE-23935
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Fetching PrimaryKey of a table through Beeline !primarykey fails with NPE
> {noformat}
> 0: jdbc:hive2://localhost:10000> !primarykeys Persons
> Error: MetaException(message:java.lang.NullPointerException) (state=,code=0)
> org.apache.hive.service.cli.HiveSQLException: 
> MetaException(message:java.lang.NullPointerException)
>       at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:360)
>       at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:351)
>       at 
> org.apache.hive.jdbc.HiveDatabaseMetaData.getPrimaryKeys(HiveDatabaseMetaData.java:573)
>       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.hive.beeline.Reflector.invoke(Reflector.java:89)
>       at org.apache.hive.beeline.Commands.metadata(Commands.java:125)
>       at org.apache.hive.beeline.Commands.primarykeys(Commands.java:231)
>       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.hive.beeline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:57)
>       at 
> org.apache.hive.beeline.BeeLine.execCommandWithPrefix(BeeLine.java:1465)
>       at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1504)
>       at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1364)
>       at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1134)
>       at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1082)
>       at 
> org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:546)
>       at org.apache.hive.beeline.BeeLine.main(BeeLine.java:528)
>       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:323)
>       at org.apache.hadoop.util.RunJar.main(RunJar.java:236){noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to