phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1462) Create unit test for COUNT DISTINCT using compression
Date Tue, 18 Nov 2014 07:43:34 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14215844#comment-14215844
] 

Hudson commented on PHOENIX-1462:
---------------------------------

SUCCESS: Integrated in Phoenix-3.0-hadoop1 #316 (See [https://builds.apache.org/job/Phoenix-3.0-hadoop1/316/])
Phoenix-1462 - Create unit test for COUNT DISTINCT using compression (Ram) (ramkrishna: rev
c77120e9816f03221fa5d002ce35881e1555e1bf)
* phoenix-core/src/it/java/org/apache/phoenix/end2end/CountDistinctCompressionIT.java


> Create unit test for COUNT DISTINCT using compression
> -----------------------------------------------------
>
>                 Key: PHOENIX-1462
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1462
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 3.0.0, 4.0.0, 5.0.0, 4.2, 3.2
>
>         Attachments: Phoenix-1462.patch
>
>
> Create a unit test for PHOENIX-1455 and ensure that it is calling the code to do compression.
Something like this:
> {code}
> @Category(NeedsOwnMiniClusterTest.class)
> public class CountDistinctCompressionIT extends BaseOwnClusterHBaseManagedTimeIT {
>         
>     @BeforeClass
>     public static void doSetup() throws Exception {
>         Map<String,String> props = Maps.newHashMapWithExpectedSize(3);
>         // Must update config before starting server
>           props.put(QueryServices.DISTINCT_VALUE_COMPRESS_THRESHOLD_ATTRIB, Long.toString(1));
>         setUpTestDriver(new ReadOnlyProps(props.entrySet().iterator()));
>     }
>     @Test
>     public void testDistinctCountOnColumn() throws Exception {
>         String tenantId = getOrganizationId();
>         initATableValues(tenantId, null, getDefaultSplits(tenantId), null);
>         String query = "SELECT count(DISTINCT A_STRING) FROM aTable";
>         Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
>         Connection conn = DriverManager.getConnection(getUrl(), props);
>         try {
>             PreparedStatement statement = conn.prepareStatement(query);
>             ResultSet rs = statement.executeQuery();
>             assertTrue(rs.next());
>             assertEquals(3, rs.getLong(1));
>             assertFalse(rs.next());
>         } finally {
>             conn.close();
>         }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message