hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-23618) NotificationLog should also contain events for default/check constraints
Date Wed, 26 Aug 2020 11:12:00 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 26/Aug/20 11:11
            Start Date: 26/Aug/20 11:11
    Worklog Time Spent: 10m 
      Work Description: adesh-rao commented on a change in pull request #1237:
URL: https://github.com/apache/hive/pull/1237#discussion_r477218017



##########
File path: itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/parse/TestReplicationScenarios.java
##########
@@ -3060,13 +3049,19 @@ public void testConstraints() throws IOException {
       assertEquals(fks.size(), 2);
       List<SQLNotNullConstraint> nns = metaStoreClientMirror.getNotNullConstraints(new
NotNullConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName , "tbl3"));
       assertEquals(nns.size(), 1);
+      List<SQLCheckConstraint> cks = metaStoreClientMirror.getCheckConstraints(new
CheckConstraintsRequest(DEFAULT_CATALOG_NAME, replDbName , "tbl7"));

Review comment:
       External tables don't support default/check constraints yet. So, skipped adding for
external table.

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/AddCheckConstraintHandler.java
##########
@@ -0,0 +1,75 @@
+/*
+ * 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.parse.repl.load.message;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.hadoop.hive.common.TableName;
+import org.apache.hadoop.hive.metastore.api.SQLCheckConstraint;
+import org.apache.hadoop.hive.metastore.messaging.AddCheckConstraintMessage;
+import org.apache.hadoop.hive.ql.ddl.DDLWork;
+import org.apache.hadoop.hive.ql.ddl.table.constraint.Constraints;
+import org.apache.hadoop.hive.ql.ddl.table.constraint.add.AlterTableAddConstraintDesc;
+import org.apache.hadoop.hive.ql.exec.Task;
+import org.apache.hadoop.hive.ql.exec.TaskFactory;
+import org.apache.hadoop.hive.ql.parse.SemanticException;
+
+public class AddCheckConstraintHandler extends AbstractMessageHandler {

Review comment:
       Added comments.
   
   I couldn't find any existing unit tests for other *Handler classes, and since TestReplicationScenarios
in itests is covering this end-to-end, I skipped unit tests.




----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 474767)
    Time Spent: 50m  (was: 40m)

> NotificationLog should also contain events for default/check constraints
> ------------------------------------------------------------------------
>
>                 Key: HIVE-23618
>                 URL: https://issues.apache.org/jira/browse/HIVE-23618
>             Project: Hive
>          Issue Type: Improvement
>          Components: Standalone Metastore
>    Affects Versions: 4.0.0
>            Reporter: Adesh Kumar Rao
>            Assignee: Adesh Kumar Rao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> This should follow similar approach of notNull/Unique constraints. This will also include
event replication for these constraints.



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

Mime
View raw message