Repository: phoenix
Updated Branches:
  refs/heads/5.x-HBase-2.0 8f7c26b5c -> f72e842df


PHOENIX-2566 Support NOT NULL constraint for any column for immutable table 
(addendum)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/f72e842d
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f72e842d
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f72e842d

Branch: refs/heads/5.x-HBase-2.0
Commit: f72e842df100b12e124c4a5b818a41610f4dc577
Parents: 8f7c26b
Author: James Taylor <jtay...@salesforce.com>
Authored: Wed Feb 14 20:15:58 2018 -0800
Committer: James Taylor <jtay...@salesforce.com>
Committed: Wed Feb 14 20:15:58 2018 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/phoenix/schema/MetaDataClient.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f72e842d/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
index f2538ab..26fd988 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java
@@ -3350,7 +3350,7 @@ public class MetaDataClient {
                                 if(colDef.isPK()) {
                                     throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.NOT_NULLABLE_COLUMN_IN_ROW_KEY)
                                     
.setColumnName(colDef.getColumnDefName().getColumnName()).build().buildException();
-                                } else if (!isImmutableRows) {
+                                } else if 
(Boolean.TRUE.equals(isImmutableRows) || (isImmutableRows == null && 
table.isImmutableRows())) {
                                     throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.KEY_VALUE_NOT_NULL)
                                     
.setColumnName(colDef.getColumnDefName().getColumnName()).build().buildException();
                                 }

Reply via email to