You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by de...@apache.org on 2023/03/02 06:38:47 UTC

[hive] branch master updated: HIVE-27103: Fix thrift compilation warnings on drop_dataconnector() (#4080)

This is an automated email from the ASF dual-hosted git repository.

dengzh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new fa81db70b69 HIVE-27103: Fix thrift compilation warnings on drop_dataconnector() (#4080)
fa81db70b69 is described below

commit fa81db70b69e9ae6ecebea483bb040d1752dc73b
Author: Quanlong Huang <hu...@gmail.com>
AuthorDate: Thu Mar 2 14:38:35 2023 +0800

    HIVE-27103: Fix thrift compilation warnings on drop_dataconnector() (#4080)
---
 .../src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp | 24 +++++++++----------
 .../hive/metastore/api/ThriftHiveMetastore.java    | 28 +++++++++++-----------
 ...ThriftHiveMetastore_drop_dataconnector_args.php | 22 ++++++++---------
 .../gen-py/hive_metastore/ThriftHiveMetastore.py   | 25 +++++++++++--------
 .../src/gen/thrift/gen-rb/thrift_hive_metastore.rb |  4 ++--
 .../src/main/thrift/hive_metastore.thrift          |  2 +-
 6 files changed, 55 insertions(+), 50 deletions(-)

diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
index 8876b38c149..e4c3444e92d 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
@@ -4034,7 +4034,7 @@ uint32_t ThriftHiveMetastore_drop_dataconnector_args::read(::apache::thrift::pro
           xfer += iprot->skip(ftype);
         }
         break;
-      case -1:
+      case 2:
         if (ftype == ::apache::thrift::protocol::T_BOOL) {
           xfer += iprot->readBool(this->ifNotExists);
           this->__isset.ifNotExists = true;
@@ -4042,7 +4042,7 @@ uint32_t ThriftHiveMetastore_drop_dataconnector_args::read(::apache::thrift::pro
           xfer += iprot->skip(ftype);
         }
         break;
-      case -2:
+      case 3:
         if (ftype == ::apache::thrift::protocol::T_BOOL) {
           xfer += iprot->readBool(this->checkReferences);
           this->__isset.checkReferences = true;
@@ -4067,16 +4067,16 @@ uint32_t ThriftHiveMetastore_drop_dataconnector_args::write(::apache::thrift::pr
   ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
   xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_dataconnector_args");
 
-  xfer += oprot->writeFieldBegin("checkReferences", ::apache::thrift::protocol::T_BOOL, -2);
-  xfer += oprot->writeBool(this->checkReferences);
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString(this->name);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, -1);
+  xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, 2);
   xfer += oprot->writeBool(this->ifNotExists);
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString(this->name);
+  xfer += oprot->writeFieldBegin("checkReferences", ::apache::thrift::protocol::T_BOOL, 3);
+  xfer += oprot->writeBool(this->checkReferences);
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
@@ -4094,16 +4094,16 @@ uint32_t ThriftHiveMetastore_drop_dataconnector_pargs::write(::apache::thrift::p
   ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
   xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_dataconnector_pargs");
 
-  xfer += oprot->writeFieldBegin("checkReferences", ::apache::thrift::protocol::T_BOOL, -2);
-  xfer += oprot->writeBool((*(this->checkReferences)));
+  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
+  xfer += oprot->writeString((*(this->name)));
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, -1);
+  xfer += oprot->writeFieldBegin("ifNotExists", ::apache::thrift::protocol::T_BOOL, 2);
   xfer += oprot->writeBool((*(this->ifNotExists)));
   xfer += oprot->writeFieldEnd();
 
-  xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1);
-  xfer += oprot->writeString((*(this->name)));
+  xfer += oprot->writeFieldBegin("checkReferences", ::apache::thrift::protocol::T_BOOL, 3);
+  xfer += oprot->writeBool((*(this->checkReferences)));
   xfer += oprot->writeFieldEnd();
 
   xfer += oprot->writeFieldStop();
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
index fbe50e990ca..6d5163d0efe 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
@@ -61711,8 +61711,8 @@ package org.apache.hadoop.hive.metastore.api;
     private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("drop_dataconnector_args");
 
     private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
-    private static final org.apache.thrift.protocol.TField IF_NOT_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ifNotExists", org.apache.thrift.protocol.TType.BOOL, (short)-1);
-    private static final org.apache.thrift.protocol.TField CHECK_REFERENCES_FIELD_DESC = new org.apache.thrift.protocol.TField("checkReferences", org.apache.thrift.protocol.TType.BOOL, (short)-2);
+    private static final org.apache.thrift.protocol.TField IF_NOT_EXISTS_FIELD_DESC = new org.apache.thrift.protocol.TField("ifNotExists", org.apache.thrift.protocol.TType.BOOL, (short)2);
+    private static final org.apache.thrift.protocol.TField CHECK_REFERENCES_FIELD_DESC = new org.apache.thrift.protocol.TField("checkReferences", org.apache.thrift.protocol.TType.BOOL, (short)3);
 
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new drop_dataconnector_argsStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new drop_dataconnector_argsTupleSchemeFactory();
@@ -61724,8 +61724,8 @@ package org.apache.hadoop.hive.metastore.api;
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       NAME((short)1, "name"),
-      IF_NOT_EXISTS((short)-1, "ifNotExists"),
-      CHECK_REFERENCES((short)-2, "checkReferences");
+      IF_NOT_EXISTS((short)2, "ifNotExists"),
+      CHECK_REFERENCES((short)3, "checkReferences");
 
       private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
 
@@ -61743,9 +61743,9 @@ package org.apache.hadoop.hive.metastore.api;
         switch(fieldId) {
           case 1: // NAME
             return NAME;
-          case -1: // IF_NOT_EXISTS
+          case 2: // IF_NOT_EXISTS
             return IF_NOT_EXISTS;
-          case -2: // CHECK_REFERENCES
+          case 3: // CHECK_REFERENCES
             return CHECK_REFERENCES;
           default:
             return null;
@@ -62160,7 +62160,7 @@ package org.apache.hadoop.hive.metastore.api;
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case -1: // IF_NOT_EXISTS
+            case 2: // IF_NOT_EXISTS
               if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                 struct.ifNotExists = iprot.readBool();
                 struct.setIfNotExistsIsSet(true);
@@ -62168,7 +62168,7 @@ package org.apache.hadoop.hive.metastore.api;
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
-            case -2: // CHECK_REFERENCES
+            case 3: // CHECK_REFERENCES
               if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                 struct.checkReferences = iprot.readBool();
                 struct.setCheckReferencesIsSet(true);
@@ -62189,17 +62189,17 @@ package org.apache.hadoop.hive.metastore.api;
         struct.validate();
 
         oprot.writeStructBegin(STRUCT_DESC);
-        oprot.writeFieldBegin(CHECK_REFERENCES_FIELD_DESC);
-        oprot.writeBool(struct.checkReferences);
-        oprot.writeFieldEnd();
-        oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC);
-        oprot.writeBool(struct.ifNotExists);
-        oprot.writeFieldEnd();
         if (struct.name != null) {
           oprot.writeFieldBegin(NAME_FIELD_DESC);
           oprot.writeString(struct.name);
           oprot.writeFieldEnd();
         }
+        oprot.writeFieldBegin(IF_NOT_EXISTS_FIELD_DESC);
+        oprot.writeBool(struct.ifNotExists);
+        oprot.writeFieldEnd();
+        oprot.writeFieldBegin(CHECK_REFERENCES_FIELD_DESC);
+        oprot.writeBool(struct.checkReferences);
+        oprot.writeFieldEnd();
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_drop_dataconnector_args.php b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_drop_dataconnector_args.php
index 2b821dade97..91bf922e62d 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_drop_dataconnector_args.php
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore_drop_dataconnector_args.php
@@ -26,12 +26,12 @@ class ThriftHiveMetastore_drop_dataconnector_args
             'isRequired' => false,
             'type' => TType::STRING,
         ),
-        -1 => array(
+        2 => array(
             'var' => 'ifNotExists',
             'isRequired' => false,
             'type' => TType::BOOL,
         ),
-        -2 => array(
+        3 => array(
             'var' => 'checkReferences',
             'isRequired' => false,
             'type' => TType::BOOL,
@@ -92,14 +92,14 @@ class ThriftHiveMetastore_drop_dataconnector_args
                         $xfer += $input->skip($ftype);
                     }
                     break;
-                case -1:
+                case 2:
                     if ($ftype == TType::BOOL) {
                         $xfer += $input->readBool($this->ifNotExists);
                     } else {
                         $xfer += $input->skip($ftype);
                     }
                     break;
-                case -2:
+                case 3:
                     if ($ftype == TType::BOOL) {
                         $xfer += $input->readBool($this->checkReferences);
                     } else {
@@ -120,19 +120,19 @@ class ThriftHiveMetastore_drop_dataconnector_args
     {
         $xfer = 0;
         $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_dataconnector_args');
-        if ($this->checkReferences !== null) {
-            $xfer += $output->writeFieldBegin('checkReferences', TType::BOOL, -2);
-            $xfer += $output->writeBool($this->checkReferences);
+        if ($this->name !== null) {
+            $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+            $xfer += $output->writeString($this->name);
             $xfer += $output->writeFieldEnd();
         }
         if ($this->ifNotExists !== null) {
-            $xfer += $output->writeFieldBegin('ifNotExists', TType::BOOL, -1);
+            $xfer += $output->writeFieldBegin('ifNotExists', TType::BOOL, 2);
             $xfer += $output->writeBool($this->ifNotExists);
             $xfer += $output->writeFieldEnd();
         }
-        if ($this->name !== null) {
-            $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
-            $xfer += $output->writeString($this->name);
+        if ($this->checkReferences !== null) {
+            $xfer += $output->writeFieldBegin('checkReferences', TType::BOOL, 3);
+            $xfer += $output->writeBool($this->checkReferences);
             $xfer += $output->writeFieldEnd();
         }
         $xfer += $output->writeFieldStop();
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
index 982a69b7603..f8a2f3a8a1c 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
@@ -22813,12 +22813,12 @@ class drop_dataconnector_args(object):
                     self.name = iprot.readString().decode('utf-8', errors='replace') if sys.version_info[0] == 2 else iprot.readString()
                 else:
                     iprot.skip(ftype)
-            elif fid == -1:
+            elif fid == 2:
                 if ftype == TType.BOOL:
                     self.ifNotExists = iprot.readBool()
                 else:
                     iprot.skip(ftype)
-            elif fid == -2:
+            elif fid == 3:
                 if ftype == TType.BOOL:
                     self.checkReferences = iprot.readBool()
                 else:
@@ -22833,17 +22833,17 @@ class drop_dataconnector_args(object):
             oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec]))
             return
         oprot.writeStructBegin('drop_dataconnector_args')
-        if self.checkReferences is not None:
-            oprot.writeFieldBegin('checkReferences', TType.BOOL, -2)
-            oprot.writeBool(self.checkReferences)
+        if self.name is not None:
+            oprot.writeFieldBegin('name', TType.STRING, 1)
+            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
             oprot.writeFieldEnd()
         if self.ifNotExists is not None:
-            oprot.writeFieldBegin('ifNotExists', TType.BOOL, -1)
+            oprot.writeFieldBegin('ifNotExists', TType.BOOL, 2)
             oprot.writeBool(self.ifNotExists)
             oprot.writeFieldEnd()
-        if self.name is not None:
-            oprot.writeFieldBegin('name', TType.STRING, 1)
-            oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name)
+        if self.checkReferences is not None:
+            oprot.writeFieldBegin('checkReferences', TType.BOOL, 3)
+            oprot.writeBool(self.checkReferences)
             oprot.writeFieldEnd()
         oprot.writeFieldStop()
         oprot.writeStructEnd()
@@ -22862,7 +22862,12 @@ class drop_dataconnector_args(object):
     def __ne__(self, other):
         return not (self == other)
 all_structs.append(drop_dataconnector_args)
-drop_dataconnector_args.thrift_spec = ()
+drop_dataconnector_args.thrift_spec = (
+    None,  # 0
+    (1, TType.STRING, 'name', 'UTF8', None, ),  # 1
+    (2, TType.BOOL, 'ifNotExists', None, None, ),  # 2
+    (3, TType.BOOL, 'checkReferences', None, None, ),  # 3
+)
 
 
 class drop_dataconnector_result(object):
diff --git a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
index f9f0d4a25ce..2cee350a156 100644
--- a/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
+++ b/standalone-metastore/metastore-common/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
@@ -8520,8 +8520,8 @@ module ThriftHiveMetastore
   class Drop_dataconnector_args
     include ::Thrift::Struct, ::Thrift::Struct_Union
     NAME = 1
-    IFNOTEXISTS = -1
-    CHECKREFERENCES = -2
+    IFNOTEXISTS = 2
+    CHECKREFERENCES = 3
 
     FIELDS = {
       NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
diff --git a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
index b364ae0ee6f..c14b12153c6 100644
--- a/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
+++ b/standalone-metastore/metastore-common/src/main/thrift/hive_metastore.thrift
@@ -2485,7 +2485,7 @@ service ThriftHiveMetastore extends fb303.FacebookService
 
   void create_dataconnector(1:DataConnector connector) throws(1:AlreadyExistsException o1, 2:InvalidObjectException o2, 3:MetaException o3)
   DataConnector get_dataconnector_req(1:GetDataConnectorRequest request) throws(1:NoSuchObjectException o1, 2:MetaException o2)
-  void drop_dataconnector(1:string name, bool ifNotExists, bool checkReferences) throws(1:NoSuchObjectException o1, 2:InvalidOperationException o2, 3:MetaException o3)
+  void drop_dataconnector(1:string name, 2:bool ifNotExists, 3:bool checkReferences) throws(1:NoSuchObjectException o1, 2:InvalidOperationException o2, 3:MetaException o3)
   list<string> get_dataconnectors() throws(1:MetaException o1)
   void alter_dataconnector(1:string name, 2:DataConnector connector) throws(1:MetaException o1, 2:NoSuchObjectException o2)