phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <...@git.apache.org>
Subject [GitHub] phoenix pull request #281: PHOENIX-4288 Indexes not used when ordering by pr...
Date Wed, 15 Nov 2017 01:55:10 GMT
Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/281#discussion_r151012514
  
    --- Diff: phoenix-core/src/it/java/org/apache/phoenix/end2end/CostBasedDecisionIT.java
---
    @@ -0,0 +1,50 @@
    +package org.apache.phoenix.end2end;
    +
    +import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
    +import static org.junit.Assert.assertTrue;
    +
    +import java.sql.Connection;
    +import java.sql.DriverManager;
    +import java.sql.PreparedStatement;
    +import java.sql.ResultSet;
    +import java.util.Properties;
    +
    +import org.apache.phoenix.util.PropertiesUtil;
    +import org.apache.phoenix.util.QueryUtil;
    +import org.junit.Test;
    +
    +public class CostBasedDecisionIT extends ParallelStatsEnabledIT {
    +
    +    @Test
    +    public void testBug4288() throws Exception {
    +        Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
    +        Connection conn = DriverManager.getConnection(getUrl(), props);
    +        conn.setAutoCommit(true);
    +        try {
    +            conn.createStatement().execute("CREATE TABLE test4288 (\n" + 
    +                    "rowkey VARCHAR PRIMARY KEY,\n" + 
    +                    "c1 VARCHAR,\n" + 
    +                    "c2 VARCHAR)");
    +            conn.createStatement().execute("CREATE LOCAL INDEX test4388_c1_idx ON test4288
(c1)");
    +
    --- End diff --
    
    How about getting the explain plan here and verify that it's doing a full table scan (i.e.
before there are any stats available)?


---

Mime
View raw message