[Mondrian] SqlTupleReader.readTuples log message not showing correct number of rows returned

Robin Tharappel rtharappel at prospricing.com
Mon Jul 16 21:50:17 EDT 2007


It looks like the SqlTupleReader.readTuples log message in the sql trace
always shows number of rows returned as being 1. For example:

SqlTupleReader.readTuples [[Location].[City]]: executing sql [select
"PA_TEST_LOCATION"."COUNTRY" as "c0", "PA_TEST_LOCATION"."STATE" as
"c1", "PA_TEST_LOCATION"."CITY" as "c2" from "PA_TEST_LOCATION"
"PA_TEST_LOCATION" where "PA_TEST_LOCATION"."STATE" in ('OR', 'WA')
group by "PA_TEST_LOCATION"."COUNTRY", "PA_TEST_LOCATION"."STATE",
"PA_TEST_LOCATION"."CITY" order by "PA_TEST_LOCATION"."COUNTRY" ASC,
"PA_TEST_LOCATION"."STATE" ASC, "PA_TEST_LOCATION"."CITY" ASC], exec 0
ms, exec+fetch 0 ms, 1 rows


It looks like this is because the rowCount attribute of the SqlStament
is not incremented in the SqlTupleReader.prepareTuples() method when
obtaining a row from the result set. If the following change is made the
row count matches up (SqlTupleReader line 408):

                if (execQuery) {
                    moreRows = resultSet.next();
                    if(moreRows) {
                    	++stmt.rowCount;
                    }
                } else {
                    currPartialResultIdx++;
                    moreRows = currPartialResultIdx <
partialResult.size();
                }
Would this have any other implications other than just the log message?

Thanks,

Robin



The information contained in this email may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please contact the sender by reply email and destroy all copies of the original message. Thank you





More information about the Mondrian mailing list