phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject phoenix git commit: PHOENIX-1405 Problem referencing lower-case column names with Phoenix / Pig / Spark (Robert Roland)
Date Fri, 07 Nov 2014 16:47:22 GMT
Repository: phoenix
Updated Branches:
  refs/heads/3.2 7d532610e -> 0e6d54ba7


PHOENIX-1405 Problem referencing lower-case column names with Phoenix / Pig / Spark (Robert
Roland)


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

Branch: refs/heads/3.2
Commit: 0e6d54ba7725e5f9d1cc23fa9f784ef674d70a79
Parents: 7d53261
Author: James Taylor <jtaylor@salesforce.com>
Authored: Fri Nov 7 08:40:43 2014 -0800
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Fri Nov 7 08:46:02 2014 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/phoenix/util/PhoenixRuntime.java   | 5 ++---
 .../java/org/apache/phoenix/pig/PhoenixPigConfigurationIT.java  | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0e6d54ba/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java b/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java
index da9ee16..870ae62 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/util/PhoenixRuntime.java
@@ -328,9 +328,9 @@ public class PhoenixRuntime {
                     ColumnInfo columnInfo = PhoenixRuntime.getColumnInfo(table, columnName);
                     columnInfoList.add(columnInfo);
                 } catch (ColumnNotFoundException cnfe) {
-                    unresolvedColumnNames.add(columnName.trim());
+                    unresolvedColumnNames.add(columnName);
                 } catch (AmbiguousColumnException ace) {
-                    unresolvedColumnNames.add(columnName.trim());
+                    unresolvedColumnNames.add(columnName);
                 }
             }
         }
@@ -371,7 +371,6 @@ public class PhoenixRuntime {
         if (columnName==null) {
             throw new SQLException("columnName must not be null.");
         }
-        columnName = columnName.trim().toUpperCase();
         PColumn pColumn = null;
         if (columnName.contains(QueryConstants.NAME_SEPARATOR)) {
             String[] tokens = columnName.split(QueryConstants.NAME_SEPARATOR_REGEX);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/0e6d54ba/phoenix-pig/src/it/java/org/apache/phoenix/pig/PhoenixPigConfigurationIT.java
----------------------------------------------------------------------
diff --git a/phoenix-pig/src/it/java/org/apache/phoenix/pig/PhoenixPigConfigurationIT.java
b/phoenix-pig/src/it/java/org/apache/phoenix/pig/PhoenixPigConfigurationIT.java
index d35e039..a6f6efd 100644
--- a/phoenix-pig/src/it/java/org/apache/phoenix/pig/PhoenixPigConfigurationIT.java
+++ b/phoenix-pig/src/it/java/org/apache/phoenix/pig/PhoenixPigConfigurationIT.java
@@ -93,7 +93,7 @@ public class PhoenixPigConfigurationIT extends BaseHBaseManagedTimeIT {
                     "  CONSTRAINT pk PRIMARY KEY (a_string, a_binary))\n";
             createTestTable(getUrl(), ddl);
             final PhoenixPigConfiguration configuration = newConfiguration (tableName);
-            configuration.setSelectColumns("a_binary");
+            configuration.setSelectColumns("A_BINARY");
             final String selectStatement = configuration.getSelectStatement();
             final String expectedSelectStatement = "SELECT \"A_BINARY\" FROM " + SchemaUtil.getEscapedArgument(tableName)
; 
             assertEquals(expectedSelectStatement, selectStatement);


Mime
View raw message