You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Jacob Isaac (Jira)" <ji...@apache.org> on 2021/01/25 21:38:00 UTC

[jira] [Created] (PHOENIX-6339) Older client using aggregate queries shows incorrect results.

Jacob Isaac created PHOENIX-6339:
------------------------------------

             Summary: Older client using aggregate queries shows incorrect results.
                 Key: PHOENIX-6339
                 URL: https://issues.apache.org/jira/browse/PHOENIX-6339
             Project: Phoenix
          Issue Type: Improvement
    Affects Versions: 4.16.0
            Reporter: Jacob Isaac
             Fix For: 4.16.0


When running an older client for eg (4.15) against a 4.16 server
The output of aggregate queries are incorrect -

expected one row with the count, actual 9 rows with counts.

The 9 rows correspond to the number of regions in the data set. As shown in the explain plan.

Connected to: Phoenix (version 4.15)
Driver: PhoenixEmbeddedDriver (version 4.15)
Autocommit status: true
Transaction isolation: TRANSACTION_READ_COMMITTED
Building list of tables and columns for tab-completion (set fastconnect to true to skip)...
225/225 (100%) Done
Done
sqlline version 1.5.0
0: jdbc:phoenix:localhost> select count(*) from BENCHMARK.BM_AGGREGATION_TABLE_2;
+-----------+
| COUNT(1) |
+-----------+
| 2389483 |
| 2319177 |
| 1958007 |
| 2389483 |
| 2319178 |
| 1958005 |
| 2233646 |
| 2249033 |
| 2183988 |
+-----------+
9 rows selected (6.56 seconds)
0: jdbc:phoenix:localhost> explain select count(*) from BENCHMARK.BM_AGGREGATION_TABLE_2;
+---------------------------------------------------------------------------------------------------------------+-----------------+----------------+----------------+
| PLAN | EST_BYTES_READ | EST_ROWS_READ | EST_INFO_TS |
+---------------------------------------------------------------------------------------------------------------+-----------------+----------------+----------------+
| CLIENT 9-CHUNK 10191406 ROWS 1887436990 BYTES PARALLEL 1-WAY FULL SCAN OVER BENCHMARK.BM_AGGREGATION_TABLE_2 | 1887436990 | 10191406 | 1611584394492 |
| SERVER FILTER BY FIRST KEY ONLY | 1887436990 | 10191406 | 1611584394492 |
| SERVER AGGREGATE INTO SINGLE ROW | 1887436990 | 10191406 | 1611584394492 |
+---------------------------------------------------------------------------------------------------------------+-----------------+----------------+----------------+



--
This message was sent by Atlassian Jira
(v8.3.4#803005)