MS SQL simply accepts ';' as a statement delimiter. Each ResultSet that is returned is available on getNextResult().
Same with MySQL, though they require you to pass allowMultipleQueries=true as an option. Snowflake is like MS SQL: https://docs.snowflake.com/en/developer-guide/jdbc/jdbc-using#multi-statement-jdbc There are numerous other JDBC drivers like this. It may or may not be allowed by the specification, but the number of drivers that use THAT as an excuse is pretty minimal. The ones I've found that don't use 'sql injection' as the reason. Which may have been a good reason initially, but I think was pretty much solved with 'don't use non parameterized queries' instead. If Calcite wants to say "the specification does not allow us to" despite all these other drivers allowing you to, fine. That's fine. But that's exactly the type of thing I was searching for by opening this question. ________________________________ From: Julian Hyde <[email protected]> Sent: Tuesday, February 17, 2026 16:07 To: [email protected] <[email protected]> Subject: Re: JDBC Driver, parseStmtList? Jerome, Are you claiming that parseStmtList is part of the JDBC API? How do you achieve this effect with other drivers? Do they return a list of PreparedStatement objects or something like that? Do they use semicolon as delimiter? (I don’t recall anything in the SQL or JDBC standards specifying a delimiter.) Julian > On Feb 17, 2026, at 08:52, Mihai Budiu <[email protected]> wrote: > > According to one AI agent, multi-statement JDBC support is actually not a > standard feature, and is only supported by some drivers. > > If there is a spec that makes sense, I guess Calcite could support it. > Calcite supports many non-standard features. > > Mihai > ________________________________ > From: Jerome Haltom <[email protected]> > Sent: Tuesday, February 17, 2026 8:45 AM > To: [email protected] <[email protected]> > Subject: Re: JDBC Driver, parseStmtList? > > I mean, if you run a statement like "select 1; select 1" it fails. It does > not support multiple SQL statements per individual JDBC call. Most other > drivers do. > > I would consider an implementation. But my question was more like "this is > how it is, is there a reason, historical or not?" If there's no reason, and > it's a thing the Calcite project would want, I would consider implementing it. > > > ________________________________ > From: Mihai Budiu <[email protected]> > Sent: Tuesday, February 17, 2026 10:41 > To: [email protected] <[email protected]> > Subject: Re: JDBC Driver, parseStmtList? > > I have not used Calcite through the JDBC driver in this way. > > Can you provide a reproduction of the issue you are seeing? > > If this is a missing feature, you should consider filing a JIRA issue, and > perhaps contributing an implementation? > https://issues.apache.org/jira/projects/CALCITE > > Mihai > ________________________________ > From: Jerome Haltom <[email protected]> > Sent: Monday, February 16, 2026 7:30 AM > To: [email protected] <[email protected]> > Subject: JDBC Driver, parseStmtList? > > I am working on an application that makes use of Calcite through the JDBC > driver, and am hitting a problem with it being unable to parse multiple > semi-colon separated statements. My investigations tell me this isn't > supported. parseStmt is invoked on the parser, not parseStmtList. And of > course the rest of it isn't built to deal with multiple statements, tracking > multiple resultsets, etc. > > I guess my first question would be, why? Is there a reason for this as it > stands, or is it just that nobody has gone through an added support for > multiple statements since that was added? >
