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-1428 Queries with limit against tenant views is broken
Date Thu, 13 Nov 2014 15:40:33 GMT
Repository: phoenix
Updated Branches:
  refs/heads/3.0 2694568aa -> 4e130d4d1


PHOENIX-1428 Queries with limit against tenant views is broken


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

Branch: refs/heads/3.0
Commit: 4e130d4d19f69ad42c936a6ccc4b5944dc916cb2
Parents: 2694568
Author: James Taylor <jtaylor@salesforce.com>
Authored: Thu Nov 13 07:36:05 2014 -0800
Committer: James Taylor <jtaylor@salesforce.com>
Committed: Thu Nov 13 07:39:42 2014 -0800

----------------------------------------------------------------------
 .../apache/phoenix/end2end/TenantSpecificTablesDMLIT.java   | 9 ++++++++-
 .../src/main/java/org/apache/phoenix/execute/ScanPlan.java  | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4e130d4d/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDMLIT.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDMLIT.java
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDMLIT.java
index 7fd3a82..c098a76 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDMLIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/TenantSpecificTablesDMLIT.java
@@ -41,7 +41,14 @@ import org.junit.experimental.categories.Category;
 
 @Category(NeedsOwnMiniClusterTest.class)
 public class TenantSpecificTablesDMLIT extends BaseTenantSpecificTablesIT {
-
+	
+	@Test
+	public void testSelectWithLimit() throws Exception {
+		Connection conn = nextConnection(PHOENIX_JDBC_TENANT_SPECIFIC_URL);
+        ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM " + TENANT_TABLE_NAME
+ " LIMIT 100");
+		while(rs.next()) {}
+	}
+	
     @Test
     public void testBasicUpsertSelect() throws Exception {
         Connection conn = nextConnection(PHOENIX_JDBC_TENANT_SPECIFIC_URL);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/4e130d4d/phoenix-core/src/main/java/org/apache/phoenix/execute/ScanPlan.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/execute/ScanPlan.java b/phoenix-core/src/main/java/org/apache/phoenix/execute/ScanPlan.java
index c35d81c..255cfa9 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/ScanPlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/ScanPlan.java
@@ -141,7 +141,7 @@ public class ScanPlan extends BaseQueryPlan {
         	if (gpsInfo == null) {
         	    // Use guidepost depth as minimum size
         	    ConnectionQueryServices services = context.getConnection().getQueryServices();
-        	    HTableDescriptor desc = services.getTableDescriptor(table.getName().getBytes());
+        	    HTableDescriptor desc = services.getTableDescriptor(table.getPhysicalName().getBytes());
                 int guidepostPerRegion = services.getProps().getInt(QueryServices.STATS_GUIDEPOST_PER_REGION_ATTRIB,
                         QueryServicesOptions.DEFAULT_STATS_GUIDEPOST_PER_REGION);
                 long guidepostWidth = services.getProps().getLong(QueryServices.STATS_GUIDEPOST_WIDTH_BYTES_ATTRIB,


Mime
View raw message