[ https://issues.apache.org/jira/browse/CALCITE-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14539300#comment-14539300 ]
Xavier FH Leong commented on CALCITE-712: ----------------------------------------- Think of it, there's no mistake in JdbcMeta.prepareAndExecute {code} if (maxRowCount > 0) { statement.setMaxRows(maxRowCount); } {code} As meta.prepareAndExecute expect maxRowCount==0 to return 0 row ResultSet, but for the scope in JdbcMeta (which is a façade for underlying JDBC driver) cannot fulfill that expectation, as setting the statement.setMaxRows(0) is giving unlimited rows instead. There will be no underlying JDBC driver that can fulfill 0 rows ResultSet, and would require additional handling to fulfill that expectation. Sorry for being pain in the ass, but I hope you can see that the miss-alignment can be implementation trap. > Avatica statement execute return all resultset instead of MaxRows from > setMaxRows > --------------------------------------------------------------------------------- > > Key: CALCITE-712 > URL: https://issues.apache.org/jira/browse/CALCITE-712 > Project: Calcite > Issue Type: Bug > Affects Versions: 1.3.0-incubating > Reporter: Xavier FH Leong > Assignee: Julian Hyde > Labels: avatica > Fix For: next > > > setMaxRows is supported, but after moving to JdbcMeta, max row was ignore and > full result set is return instead. -- This message was sent by Atlassian JIRA (v6.3.4#6332)