phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject [2/2] phoenix git commit: PHOENIX-1420 DatabaseMetaData.getschemas returns incorrect column order
Date Sat, 08 Nov 2014 05:45:50 GMT
PHOENIX-1420 DatabaseMetaData.getschemas returns incorrect column order


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

Branch: refs/heads/4.2
Commit: 3e99349b7e5582bbe2f79e7fe01b06528240a42e
Parents: b4386bc
Author: James Taylor <jtaylor@salesforce.com>
Authored: Fri Nov 7 21:44:15 2014 -0800
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Fri Nov 7 21:44:15 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java | 4 ++--
 .../java/org/apache/phoenix/jdbc/PhoenixDatabaseMetaData.java    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3e99349b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
index 4c5c828..ed6300e 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryDatabaseMetaDataIT.java
@@ -168,8 +168,8 @@ public class QueryDatabaseMetaDataIT extends BaseClientManagedTimeIT {
         ResultSet rs;
         rs = dbmd.getSchemas(null, CUSTOM_ENTITY_DATA_SCHEMA_NAME);
         assertTrue(rs.next());
-        assertEquals(rs.getString("TABLE_SCHEM"),CUSTOM_ENTITY_DATA_SCHEMA_NAME);
-        assertEquals(rs.getString("TABLE_CATALOG"),null);
+        assertEquals(rs.getString(1),CUSTOM_ENTITY_DATA_SCHEMA_NAME);
+        assertEquals(rs.getString(2),null);
         assertFalse(rs.next());
 
         rs = dbmd.getSchemas(null, null);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/3e99349b/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 0a39104..433de72 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
@@ -877,8 +877,8 @@ public class PhoenixDatabaseMetaData implements DatabaseMetaData, org.apache.pho
     @Override
     public ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException
{
         StringBuilder buf = new StringBuilder("select distinct \n" +
-                TENANT_ID + " " + TABLE_CATALOG + "," + // no catalog for tables
-                TABLE_SCHEM +
+                TABLE_SCHEM + "," +
+                TENANT_ID + " " + TABLE_CATALOG +
                 " from " + SYSTEM_CATALOG + " " + SYSTEM_CATALOG_ALIAS +
                 " where " + COLUMN_NAME + " is null");
         this.addTenantIdFilter(buf, catalog);


Mime
View raw message