nrg4878 commented on a change in pull request #2037: URL: https://github.com/apache/hive/pull/2037#discussion_r601837858
########## File path: ql/src/java/org/apache/hadoop/hive/ql/ddl/dataconnector/drop/DropDataConnectorDesc.java ########## @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.hadoop.hive.ql.ddl.dataconnector.drop; + +import java.io.Serializable; + +import org.apache.hadoop.hive.ql.ddl.DDLDesc; +import org.apache.hadoop.hive.ql.parse.ReplicationSpec; +import org.apache.hadoop.hive.ql.plan.Explain; +import org.apache.hadoop.hive.ql.plan.Explain.Level; + +/** + * DDL task description for DROP CONNECTOR commands. + */ +@Explain(displayName = "Drop Connector", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED }) +public class DropDataConnectorDesc implements DDLDesc, Serializable { + private static final long serialVersionUID = 1L; + + private final String connectorName; + private final boolean ifExists; + private final ReplicationSpec replicationSpec; + + public DropDataConnectorDesc(String connectorName, boolean ifExists, ReplicationSpec replicationSpec) { + this(connectorName, ifExists, false, replicationSpec); + } + + public DropDataConnectorDesc(String connectorName, boolean ifExists, boolean cascade, ReplicationSpec replicationSpec) { + this.connectorName = connectorName; + this.ifExists = ifExists; + this.replicationSpec = replicationSpec; + } + + @Explain(displayName = "connector", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED }) + public String getConnectorName() { + return connectorName; + } + + @Explain(displayName = "if exists") + public boolean getIfExists() { + return ifExists; + } + + public ReplicationSpec getReplicationSpec() { Review comment: I dont know why this ReplicationSpec is on the DROP descriptor. We cannot specify a replication spec for connector. I will create a jira to followup on this. @Explain(displayName = "connector", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED }) public String getConnectorName() { return connectorName; } @Explain(displayName = "if exists") public boolean getIfExists() { return ifExists; } public ReplicationSpec getReplicationSpec() { return replicationSpec; } -- 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: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
