You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ma...@apache.org on 2015/08/23 19:15:38 UTC
[13/40] phoenix git commit: PHOENIX-2139 LIKE '%' is not filtering
out null columns
PHOENIX-2139 LIKE '%' is not filtering out null columns
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/5076052d
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5076052d
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5076052d
Branch: refs/heads/calcite
Commit: 5076052d5a84194554da96894c27a3829ce6e75b
Parents: a50ead2
Author: James Taylor <ja...@apache.org>
Authored: Wed Jul 22 16:22:58 2015 -0700
Committer: James Taylor <ja...@apache.org>
Committed: Wed Jul 22 16:22:58 2015 -0700
----------------------------------------------------------------------
.../main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/5076052d/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
index 314af2e..d27a349 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java
@@ -491,7 +491,7 @@ public class PhoenixDatabaseMetaData implements DatabaseMetaData, org.apache.pho
where.append(COLUMN_NAME + " like '" + StringUtil.escapeStringConstant(colPattern) + "'" );
}
}
- if (colPattern == null) {
+ if (colPattern == null || colPattern.length() == 0) {
appendConjunction(where);
where.append(COLUMN_NAME + " is not null" );
}