Skip to content

Commit 72cfa09

Browse files
author
Kadir Ozdemir
committed
Some minor edits on comments in the code
1 parent 7e09907 commit 72cfa09

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

phoenix-core-client/src/main/java/org/apache/phoenix/compile/QueryCompiler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,9 @@ protected QueryPlan compileSingleFlatQuery(StatementContext context, SelectState
758758
throw new SQLException(
759759
"ROW_SIZE() can only be an argument to an aggregation function in a select clause. \n"
760760
+ "To get the size of a single row, an aggregation function can be used over the row, e.g., \n"
761-
+ "SELECT SUM(ROW_SIZE) ... WHERE PK = <my PK>. To return the row sizes for multiple rows, \n"
761+
+ "SELECT SUM(ROW_SIZE()) ... WHERE PK = <my PK>. To return the row sizes for multiple rows, \n"
762762
+ "a group by clause can be used to have single row groups, e.g., \n"
763-
+ "SELECT SUM(ROW_SIZE) ... WHERE PK = <my PK> GROUP BY PK ");
763+
+ "SELECT SUM(ROW_SIZE()) ... WHERE PK = <my PK> GROUP BY PK ");
764764
}
765765
}
766766
boolean isApplicable = true;

phoenix-core-client/src/main/java/org/apache/phoenix/filter/RowLevelFilter.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import org.apache.phoenix.schema.tuple.Tuple;
3030

3131
/**
32-
* Filter for use when expressions reference to the entire row
32+
* Filter used when expressions reference to the entire row
3333
*/
3434
public class RowLevelFilter extends BooleanExpressionFilter {
3535
private boolean keepRow = false;
@@ -47,10 +47,6 @@ public void reset() {
4747
keepRow = false;
4848
}
4949

50-
/**
51-
* Evaluate in filterKeyValue instead of filterRowKey, because HBASE-6562 causes filterRowKey to
52-
* be called with deleted or partial row keys.
53-
*/
5450
// No @Override for HBase 3 compatibility
5551
public ReturnCode filterKeyValue(Cell v) {
5652
return filterCell(v);

phoenix-core/src/it/java/org/apache/phoenix/end2end/BaseAggregateIT.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818
package org.apache.phoenix.end2end;
1919

20-
import static org.apache.phoenix.end2end.ParallelStatsDisabledIT.validateQueryPlan;
2120
import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
2221
import static org.apache.phoenix.util.TestUtil.assertResultSet;
2322
import 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

Comments
 (0)