Repository: phoenix
Updated Branches:
  refs/heads/calcite e7ac8cbbe -> 71672620f


Fix nullable attribute for columns


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

Branch: refs/heads/calcite
Commit: eaebca870b189f3d97774f22fc2659dede699cd2
Parents: e7ac8cb
Author: maryannxue <wei....@intel.com>
Authored: Tue Sep 8 15:33:25 2015 -0400
Committer: maryannxue <wei....@intel.com>
Committed: Tue Sep 8 15:33:25 2015 -0400

----------------------------------------------------------------------
 .../src/it/java/org/apache/phoenix/calcite/CalciteIT.java        | 4 ++--
 .../src/main/java/org/apache/phoenix/calcite/PhoenixTable.java   | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eaebca87/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteIT.java
index ab9aaf1..190ec0a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/calcite/CalciteIT.java
@@ -583,9 +583,9 @@ public class CalciteIT extends BaseClientManagedTimeIT {
     }
     
     @Test public void testAggregate() {
-        start().sql("select a_string, count(entity_id) from atable group by 
a_string")
+        start().sql("select a_string, count(b_string) from atable group by 
a_string")
                 .explainIs("PhoenixToEnumerableConverter\n" +
-                           "  PhoenixServerAggregate(group=[{2}], 
EXPR$1=[COUNT()])\n" +
+                           "  PhoenixServerAggregate(group=[{2}], 
EXPR$1=[COUNT($3)])\n" +
                            "    PhoenixTableScan(table=[[phoenix, ATABLE]])\n")
                 .resultIs(new Object[][] {
                           {"a", 4L},

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eaebca87/phoenix-core/src/main/java/org/apache/phoenix/calcite/PhoenixTable.java
----------------------------------------------------------------------
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/calcite/PhoenixTable.java 
b/phoenix-core/src/main/java/org/apache/phoenix/calcite/PhoenixTable.java
index cfda441..5c786b5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/calcite/PhoenixTable.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/calcite/PhoenixTable.java
@@ -89,6 +89,7 @@ public class PhoenixTable extends AbstractTable implements 
TranslatableTable {
                 type = typeFactory.createArrayType(type, arraySize == null ? 
-1 : arraySize);
             }
             builder.add(pColumn.getName().getString(), type);
+            builder.nullable(pColumn.isNullable());
         }
         return builder.build();
     }

Reply via email to