kasakrisz commented on a change in pull request #2752:
URL: https://github.com/apache/hive/pull/2752#discussion_r739460166
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java
##########
@@ -800,19 +804,59 @@ private String getExternal(Table table) {
return table.getTableType() == TableType.EXTERNAL_TABLE ? "EXTERNAL " : "";
}
- private String getColumns(Table table) {
- List<String> columnDescs = new ArrayList<String>();
+ private String getColumns(Table table) throws HiveException{
+ List<String> columnDescs = new ArrayList<>();
+ Set<String> notNullColumns = null;
+ if
(NotNullConstraint.isNotNullConstraintNotEmpty(table.getNotNullConstraint())) {
+ notNullColumns = new
HashSet<>(table.getNotNullConstraint().getNotNullConstraints().values());
+ }
+
+ Map<String, String> columnDefaultValueMap = null;
+ if
(DefaultConstraint.isCheckConstraintNotEmpty(table.getDefaultConstraint())) {
Review comment:
Also looks good to me.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]