zhuangdaz opened a new issue, #10879:
URL: https://github.com/apache/pinot/issues/10879

   Hi team, I am using [jooq](https://www.jooq.org/) for querying Pinot but 
running into an exception when there is no match. 
   ```
   Caused by: java.sql.SQLException: Unknown column index : 2
   ```
   
   I think the root cause is b/c:
   
   1. 
[PinotStatement](https://github.com/apache/pinot/blob/master/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotStatement.java#L87-L88)
 returns a null when there is empty-row(no match) result;
   2. Then 
[Jooq](https://github.com/jOOQ/jOOQ/blob/main/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java#L253-L259)
 tries to insert an updateCount row which is not able to be parsed with the 
original cols
   
   I wonder if this has any existing solution or we should update 
`PinotStatement.execute()`(and `PinotPreparedStatement.execute()`) to return a 
non-null ResultSet with 0 row instead(this looks the correct fix since an 
empty-row ResultSet should still be valid based on the discussion 
[here](https://github.com/jOOQ/jOOQ/issues/6907#:~:text=So%20yes.%20I%20come%20from%20SQL%20and%20JDBC%2C%20and%20null%20meaning%20no%20result%2C%20not%20empty%20result%2C%20is%20the%20only%20reasonable%20interpretation%20here.)).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to