From issues-return-183779-archive-asf-public=cust-asf.ponee.io@hive.apache.org Mon Mar 30 11:53:02 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7D958180634 for ; Mon, 30 Mar 2020 13:53:02 +0200 (CEST) Received: (qmail 74635 invoked by uid 500); 30 Mar 2020 11:53:01 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 74626 invoked by uid 99); 30 Mar 2020 11:53:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2020 11:53:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DF997E139A for ; Mon, 30 Mar 2020 11:53:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 185287804F5 for ; Mon, 30 Mar 2020 11:53:00 +0000 (UTC) Date: Mon, 30 Mar 2020 11:53:00 +0000 (UTC) From: "Arnaud Linz (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-23105) HiveServer2 regression breaks getUpdateCount / getMoreResult API contract MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-23105?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Arnaud Linz updated HIVE-23105: ------------------------------- Description:=20 Migrating from CDH 5.16 (Hive 1.1.0+) to CDH 6.3 (Hive 2.1.1+) introduced a= regression in the the JDBC driver. It was detected in a "agnostic" jdbc handling service which works for sever= al DBMS including Teradata, Impala, and the former Hive driver. =C2=A0 java.sql.Statement JDBC Interface method : {code:java} /**=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0Retrieves=C2=A0the=C2=A0current=C2=A0= result=C2=A0as an update=C2=A0count;=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 if the=C2=A0result=C2=A0is=C2=A0a Re= sultSet=C2=A0object=C2=A0or=C2=A0there=C2=A0are no more=C2=A0results= , -1=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0is=C2=A0returned. This=C2=A0method=C2= =A0should=C2=A0be=C2=A0called=C2=A0only=C2=A0once per=C2=A0result.=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @return the=C2=A0current=C2=A0result=C2=A0as an = update=C2=A0count;=C2=A0-1 if=C2=A0the=C2=A0current=C2=A0result=C2=A0is=C2= =A0a=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * ResultSet=C2=A0object=C2=A0or=C2=A0= there=C2=A0are no more=C2=A0results=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @exception=C2=A0SQLException=C2=A0if a=C2=A0data= base=C2=A0access=C2=A0error=C2=A0occurs=C2=A0or=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0this=C2=A0method=C2=A0is=C2=A0called=C2=A0o= n a=C2=A0closed=C2=A0Statement=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @see=C2=A0#execute=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 */=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0int=C2=A0getUpdateCount()=C2=A0throws=C2=A0SQLExcep= tion;=C2=A0{code} =C2=A0 =C2=A0 Does not return -1 when it should, it rather throws : =C2=A0 {code:java} Caused=C2=A0by:=C2=A0java.sql.SQLException:=C2=A0org.apache.thrift.protocol= .TProtocolException:=C2=A0Required=C2=A0field=C2=A0'operationHandle'=C2=A0i= s=C2=A0unset!=C2=A0Struct:TGetOperationStatusReq(operationHandle:null)=C2= =A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.waitForO= perationToComplete(HiveStatement.java:395)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.getUpdat= eCount(HiveStatement.java:688)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0...=C2=A030=C2=A0more=C2=A0 Caused=C2=A0by:=C2=A0org.apache.thrift.protocol.TProtocolException:=C2=A0Re= quired=C2=A0field=C2=A0'operationHandle'=C2=A0is=C2=A0unset!=C2=A0Struct:TG= etOperationStatusReq(operationHandle:null)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TGetOper= ationStatusReq.validate(TGetOperationStatusReq.java:294)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args.validate(TCLIService.java:12587)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args$GetOperationStatus_argsStandardScheme.write(TCL= IService.java:12644)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args$GetOperationStatus_argsStandardScheme.write(TCL= IService.java:12613)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args.write(TCLIService.java:12564)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.thrift.TServiceClient.sendBase(T= ServiceClient.java:71)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.thrift.TServiceClient.sendBase(T= ServiceClient.java:62)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$Client.send_GetOperationStatus(TCLIService.java:461)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$Client.GetOperationStatus(TCLIService.java:453)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.NativeMethodAccessorImpl.invoke= 0(Native=C2=A0Method)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.NativeMethodAccessorImpl.invoke= (NativeMethodAccessorImpl.java:62)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.DelegatingMethodAccessorImpl.in= voke(DelegatingMethodAccessorImpl.java:43)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0java.lang.reflect.Method.invoke(Method.java= :498)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveConnection$Synchro= nizedHandler.invoke(HiveConnection.java:1415)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0com.sun.proxy.$Proxy20.GetOperationStatus(U= nknown=C2=A0Source)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.waitForO= perationToComplete(HiveStatement.java:364)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0...=C2=A033=C2=A0more=C2=A0{code} =C2=A0 And method: {code:java} =C2=A0=C2=A0=C2=A0 /**=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * Moves to=C2=A0this=C2=A0Statement= =C2=A0object's=C2=A0next=C2=A0result,=C2=A0returns=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * true if=C2=A0it=C2=A0is=C2=A0a ResultSet=C2=A0object, and=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0implicitly=C2=A0closes=C2=A0any=C2=A0curren= t=C2=A0ResultSet=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0object(s)=C2=A0obtained=C2=A0with=C2=A0the= =C2=A0method=C2=A0getResultSet.=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *

There are no more=C2=A0results=C2=A0when=C2= =A0the=C2=A0following=C2=A0is=C2=A0true:=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *

{@code=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0 //=C2=A0stmt=C2=A0is=C2=
=A0a=C2=A0Statement=C2=A0object=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0 ((stmt.getMoreResults() =
=3D=3D false) && (stmt.getUpdateCount() =3D=3D -1))=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* }
=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @return true if the=C2=A0next=C2=A0= result=C2=A0is=C2=A0a ResultSet=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0object; false if=C2=A0it=C2=A0is=C2=A0an update count=C2= =A0or=C2=A0there=C2=A0are=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = no more=C2=A0results=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @exception=C2=A0SQLException=C2=A0if a=C2=A0data= base=C2=A0access=C2=A0error=C2=A0occurs=C2=A0or=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0this=C2=A0method=C2=A0is=C2=A0called=C2=A0o= n a=C2=A0closed=C2=A0Statement=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @see=C2=A0#execute=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 */=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0boolean=C2=A0getMoreResults()=C2=A0throws=C2=A0SQLE= xception;=C2=A0 {code} Always returns true if the statement is not a result set whereas false is e= xpected. =C2=A0 =C2=A0 =C2=A0 =C2=A0 was: Migrating from CDH 5.16 (Hive 1.1.0+) to CDH 6.3 (Hive 2.1.1+) introduced a= regression in the the JDBC driver. It was detected in a "agnostic" jdbc handling service which works for sever= al DBMS including Teradata, Impala, and the former Hive driver. =C2=A0 java.sql.Statement JDBC Interface method : {code:java} /**=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0Retrieves=C2=A0the=C2=A0current=C2=A0= result=C2=A0as an update=C2=A0count;=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 if the=C2=A0result=C2=A0is=C2=A0a Re= sultSet=C2=A0object=C2=A0or=C2=A0there=C2=A0are no more=C2=A0results= , -1=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0is=C2=A0returned. This=C2=A0method=C2= =A0should=C2=A0be=C2=A0called=C2=A0only=C2=A0once per=C2=A0result.=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @return the=C2=A0current=C2=A0result=C2=A0as an = update=C2=A0count;=C2=A0-1 if=C2=A0the=C2=A0current=C2=A0result=C2=A0is=C2= =A0a=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * ResultSet=C2=A0object=C2=A0or=C2=A0= there=C2=A0are no more=C2=A0results=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @exception=C2=A0SQLException=C2=A0if a=C2=A0data= base=C2=A0access=C2=A0error=C2=A0occurs=C2=A0or=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0this=C2=A0method=C2=A0is=C2=A0called=C2=A0o= n a=C2=A0closed=C2=A0Statement=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @see=C2=A0#execute=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 */=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0int=C2=A0getUpdateCount()=C2=A0throws=C2=A0SQLExcep= tion;=C2=A0{code} =C2=A0 =C2=A0 Does not return -1 when it should, it rather throws : =C2=A0 {code:java} Caused=C2=A0by:=C2=A0java.sql.SQLException:=C2=A0org.apache.thrift.protocol= .TProtocolException:=C2=A0Required=C2=A0field=C2=A0'operationHandle'=C2=A0i= s=C2=A0unset!=C2=A0Struct:TGetOperationStatusReq(operationHandle:null)=C2= =A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.waitForO= perationToComplete(HiveStatement.java:395)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.getUpdat= eCount(HiveStatement.java:688)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0...=C2=A030=C2=A0more=C2=A0 Caused=C2=A0by:=C2=A0org.apache.thrift.protocol.TProtocolException:=C2=A0Re= quired=C2=A0field=C2=A0'operationHandle'=C2=A0is=C2=A0unset!=C2=A0Struct:TG= etOperationStatusReq(operationHandle:null)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TGetOper= ationStatusReq.validate(TGetOperationStatusReq.java:294)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args.validate(TCLIService.java:12587)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args$GetOperationStatus_argsStandardScheme.write(TCL= IService.java:12644)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args$GetOperationStatus_argsStandardScheme.write(TCL= IService.java:12613)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$GetOperationStatus_args.write(TCLIService.java:12564)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.thrift.TServiceClient.sendBase(T= ServiceClient.java:71)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.thrift.TServiceClient.sendBase(T= ServiceClient.java:62)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$Client.send_GetOperationStatus(TCLIService.java:461)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLIServ= ice$Client.GetOperationStatus(TCLIService.java:453)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.NativeMethodAccessorImpl.invoke= 0(Native=C2=A0Method)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.NativeMethodAccessorImpl.invoke= (NativeMethodAccessorImpl.java:62)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.DelegatingMethodAccessorImpl.in= voke(DelegatingMethodAccessorImpl.java:43)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0java.lang.reflect.Method.invoke(Method.java= :498)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveConnection$Synchro= nizedHandler.invoke(HiveConnection.java:1415)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0com.sun.proxy.$Proxy20.GetOperationStatus(U= nknown=C2=A0Source)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.waitForO= perationToComplete(HiveStatement.java:364)=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0...=C2=A033=C2=A0more=C2=A0{code} =C2=A0 And method: {code:java} =C2=A0=C2=A0=C2=A0 /**=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * Moves to=C2=A0this=C2=A0Statement= =C2=A0object's=C2=A0next=C2=A0result,=C2=A0returns=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * true if=C2=A0it=C2=A0is=C2=A0a ResultSet=C2=A0object, and=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0implicitly=C2=A0closes=C2=A0any=C2=A0curren= t=C2=A0ResultSet=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0object(s)=C2=A0obtained=C2=A0with=C2=A0the= =C2=A0method=C2=A0getResultSet.=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *

There are no more=C2=A0results=C2=A0when=C2= =A0the=C2=A0following=C2=A0is=C2=A0true:=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *

{@code=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0 //=C2=A0stmt=C2=A0is=C2=
=A0a=C2=A0Statement=C2=A0object=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0 ((stmt.getMoreResults() =
=3D=3D false) && (stmt.getUpdateCount() =3D=3D -1))=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* }
=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @return true if the=C2=A0next=C2=A0= result=C2=A0is=C2=A0a ResultSet=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0object; false if=C2=A0it=C2=A0is=C2=A0an update count=C2= =A0or=C2=A0there=C2=A0are=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = no more=C2=A0results=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @exception=C2=A0SQLException=C2=A0if a=C2=A0data= base=C2=A0access=C2=A0error=C2=A0occurs=C2=A0or=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0this=C2=A0method=C2=A0is=C2=A0called=C2=A0o= n a=C2=A0closed=C2=A0Statement=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 * @see=C2=A0#execute=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 */=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0boolean=C2=A0getMoreResults()=C2=A0throws=C2=A0SQLE= xception;=C2=A0 {code} Always returns true if the statement is not a result set whereas false is e= xpected (especially since the javadoc's ((stmt.getMoreResults() =3D=3D fals= e) && (stmt.getUpdateCount() =3D=3D -1)) throws an Exception...)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > HiveServer2 regression breaks getUpdateCount / getMoreResult API contract > ------------------------------------------------------------------------- > > Key: HIVE-23105 > URL: https://issues.apache.org/jira/browse/HIVE-23105 > Project: Hive > Issue Type: Bug > Components: JDBC > Affects Versions: 2.1.1 > Reporter: Arnaud Linz > Priority: Major > > Migrating from CDH 5.16 (Hive 1.1.0+) to CDH 6.3 (Hive 2.1.1+) introduced= a regression in the the JDBC driver. > It was detected in a "agnostic" jdbc handling service which works for sev= eral DBMS including Teradata, Impala, and the former Hive driver. > =C2=A0 > java.sql.Statement JDBC Interface method : > {code:java} > /**=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0Retrieves=C2=A0the=C2=A0current=C2= =A0result=C2=A0as an update=C2=A0count;=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 if the=C2=A0result=C2=A0is=C2=A0a = ResultSet=C2=A0object=C2=A0or=C2=A0there=C2=A0are no more=C2=A0resul= ts, -1=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0is=C2=A0returned. This=C2=A0method= =C2=A0should=C2=A0be=C2=A0called=C2=A0only=C2=A0once per=C2=A0result.=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * @return the=C2=A0current=C2=A0result=C2=A0as a= n update=C2=A0count;=C2=A0-1 if=C2=A0the=C2=A0current=C2=A0result=C2=A0is= =C2=A0a=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * ResultSet=C2=A0object=C2=A0or=C2= =A0there=C2=A0are no more=C2=A0results=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * @exception=C2=A0SQLException=C2=A0if a=C2=A0da= tabase=C2=A0access=C2=A0error=C2=A0occurs=C2=A0or=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0this=C2=A0method=C2=A0is=C2=A0called=C2= =A0on a=C2=A0closed=C2=A0Statement=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * @see=C2=A0#execute=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 */=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0int=C2=A0getUpdateCount()=C2=A0throws=C2=A0SQLExc= eption;=C2=A0{code} > =C2=A0 =C2=A0 Does not return -1 when it should, it rather throws : > =C2=A0 > {code:java} > Caused=C2=A0by:=C2=A0java.sql.SQLException:=C2=A0org.apache.thrift.protoc= ol.TProtocolException:=C2=A0Required=C2=A0field=C2=A0'operationHandle'=C2= =A0is=C2=A0unset!=C2=A0Struct:TGetOperationStatusReq(operationHandle:null)= =C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.waitFo= rOperationToComplete(HiveStatement.java:395)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.getUpd= ateCount(HiveStatement.java:688)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0...=C2=A030=C2=A0more=C2=A0 > Caused=C2=A0by:=C2=A0org.apache.thrift.protocol.TProtocolException:=C2=A0= Required=C2=A0field=C2=A0'operationHandle'=C2=A0is=C2=A0unset!=C2=A0Struct:= TGetOperationStatusReq(operationHandle:null)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TGetOp= erationStatusReq.validate(TGetOperationStatusReq.java:294)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLISe= rvice$GetOperationStatus_args.validate(TCLIService.java:12587)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLISe= rvice$GetOperationStatus_args$GetOperationStatus_argsStandardScheme.write(T= CLIService.java:12644)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLISe= rvice$GetOperationStatus_args$GetOperationStatus_argsStandardScheme.write(T= CLIService.java:12613)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLISe= rvice$GetOperationStatus_args.write(TCLIService.java:12564)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.thrift.TServiceClient.sendBase= (TServiceClient.java:71)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.thrift.TServiceClient.sendBase= (TServiceClient.java:62)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLISe= rvice$Client.send_GetOperationStatus(TCLIService.java:461)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.service.rpc.thrift.TCLISe= rvice$Client.GetOperationStatus(TCLIService.java:453)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.NativeMethodAccessorImpl.invo= ke0(Native=C2=A0Method)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.NativeMethodAccessorImpl.invo= ke(NativeMethodAccessorImpl.java:62)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0sun.reflect.DelegatingMethodAccessorImpl.= invoke(DelegatingMethodAccessorImpl.java:43)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0java.lang.reflect.Method.invoke(Method.ja= va:498)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveConnection$Synch= ronizedHandler.invoke(HiveConnection.java:1415)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0com.sun.proxy.$Proxy20.GetOperationStatus= (Unknown=C2=A0Source)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0at=C2=A0org.apache.hive.jdbc.HiveStatement.waitFo= rOperationToComplete(HiveStatement.java:364)=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0...=C2=A033=C2=A0more=C2=A0{code} > =C2=A0 > And method: > {code:java} > =C2=A0=C2=A0=C2=A0 /**=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * Moves to=C2=A0this=C2=A0Statement= =C2=A0object's=C2=A0next=C2=A0result,=C2=A0returns=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * true if=C2=A0it=C2=A0is=C2=A0a ResultSet=C2=A0object, and=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0implicitly=C2=A0closes=C2=A0any=C2=A0curr= ent=C2=A0ResultSet=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0object(s)=C2=A0obtained=C2=A0with=C2=A0th= e=C2=A0method=C2=A0getResultSet.=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *

There are no more=C2=A0results=C2=A0when=C2= =A0the=C2=A0following=C2=A0is=C2=A0true:=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *

{@code=C2=A0
> =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0 //=C2=A0stmt=C2=A0is=
=C2=A0a=C2=A0Statement=C2=A0object=C2=A0
> =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0 ((stmt.getMoreResults(=
) =3D=3D false) && (stmt.getUpdateCount() =3D=3D -1))=C2=A0
> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* }
=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * @return true if the=C2=A0next=C2= =A0result=C2=A0is=C2=A0a ResultSet=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0object; false if=C2=A0it=C2=A0is=C2=A0an update count= =C2=A0or=C2=A0there=C2=A0are=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 no more=C2=A0results=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * @exception=C2=A0SQLException=C2=A0if a=C2=A0da= tabase=C2=A0access=C2=A0error=C2=A0occurs=C2=A0or=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 *=C2=A0this=C2=A0method=C2=A0is=C2=A0called=C2= =A0on a=C2=A0closed=C2=A0Statement=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 * @see=C2=A0#execute=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0 */=C2=A0 > =C2=A0=C2=A0=C2=A0=C2=A0boolean=C2=A0getMoreResults()=C2=A0throws=C2=A0SQ= LException;=C2=A0 > {code} > Always returns true if the statement is not a result set whereas false is= expected. > =C2=A0 > =C2=A0 > =C2=A0 > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)