1717 */
1818package org .apache .phoenix .end2end ;
1919
20- import static org .apache .phoenix .end2end .ParallelStatsDisabledIT .validateQueryPlan ;
2120import static org .apache .phoenix .util .TestUtil .TEST_PROPERTIES ;
2221import static org .apache .phoenix .util .TestUtil .assertResultSet ;
2322import static org .junit .Assert .assertEquals ;
@@ -274,15 +273,15 @@ public void testRowSizeFunction() throws Exception {
274273 String tableName = generateUniqueName ();
275274 initData (conn , tableName );
276275
277- // Let us establish that there are 8 rows
276+ // There are 8 rows
278277 QueryBuilder queryBuilder =
279278 new QueryBuilder ().setSelectExpression ("count(1)" ).setFullTableName (tableName );
280279 ResultSet rs = executeQuery (conn , queryBuilder );
281280 assertTrue (rs .next ());
282281 assertEquals (8 , rs .getLong (1 ));
283282 assertFalse (rs .next ());
284283
285- // Let collect row sizes from HBase
284+ // Row sizes from HBase
286285 int [] rowSizes = new int [8 ];
287286 int rowIndex = 0 ;
288287 ConnectionQueryServices cqs = conn .unwrap (PhoenixConnection .class ).getQueryServices ();
@@ -300,7 +299,7 @@ public void testRowSizeFunction() throws Exception {
300299 }
301300 }
302301
303- // Verify that each row sizes is computed correctly
302+ // Verify that each row sizes is computed correctly by the function row_size()
304303 queryBuilder = new QueryBuilder ().setSelectExpression ("sum(row_size())" )
305304 .setFullTableName (tableName ).setGroupByClause ("ID" );
306305 rs = executeQuery (conn , queryBuilder );
@@ -316,21 +315,22 @@ public void testRowSizeFunction() throws Exception {
316315 totalRowSize += rowSizes [i ];
317316 }
318317
319- // Verify that the sum function over row sizes return the expected total
318+ // Verify that the sum function over row sizes returns the expected total
320319 queryBuilder =
321320 new QueryBuilder ().setSelectExpression ("sum(row_size())" ).setFullTableName (tableName );
322321 rs = executeQuery (conn , queryBuilder );
323322 assertTrue (rs .next ());
324323 assertEquals (totalRowSize , rs .getLong (1 ));
325324 assertFalse (rs .next ());
326325
327- // Verify that some other aggregation functions works with row_size()
326+ // Verify that some other aggregation functions work with row_size()
328327 queryBuilder =
329328 new QueryBuilder ().setSelectExpression ("avg(row_size()), min(row_size()), max(row_size())" )
330329 .setFullTableName (tableName );
331330 rs = executeQuery (conn , queryBuilder );
332331 assertTrue (rs .next ());
333332 assertEquals (totalRowSize / 8 , rs .getLong (1 ));
333+
334334 // There are four 90 byte rows and four 92 byte rows
335335 assertEquals (90 , rs .getLong (2 ));
336336 assertEquals (92 , rs .getLong (3 ));
0 commit comments