You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/11/29 16:58:06 UTC

[GitHub] [hive] soumyakanti3578 commented on a change in pull request #2777: HIVE-25652: Add constraints in result of “SHOW CREATE TABLE ”

soumyakanti3578 commented on a change in pull request #2777:
URL: https://github.com/apache/hive/pull/2777#discussion_r758558430



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/CheckConstraint.java
##########
@@ -34,13 +34,40 @@
 @SuppressWarnings("serial")
 public class CheckConstraint implements Serializable {
 
-  public class CheckConstraintCol {
-    public String colName;
-    public String checkExpression;
-
-    public CheckConstraintCol(String colName, String checkExpression) {
+  public static class CheckConstraintCol {
+    private final String colName;
+    private final String checkExpression;
+    private final String enable;
+    private final String validate;
+    private final String rely;

Review comment:
       I think we should keep them as `String` becasue:
   1. we can get the boolean values using `constraint.isEnable_cstr()` anyway.
   2. We are setting them to String values based on its boolean values [here](https://github.com/apache/hive/pull/2777/files/3c667cfa85e41f5c7377aa0f606b3d1fe7c467e5#diff-adcaf114fc9b04e43b9004e5464e588a85022712a79b3592d374fb69e8d1f8bdR98), which helps while printing.




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

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org