Duh, make that
public void onStart(Statement s, ResultSetMetadata metadata)
Yes, no results would be a soft spot in the continuous logic. As for an onStart or similar method, I've resisted adding one since that would effectively be a push of information to the client, which doesn't fix with the current request response model and so far the continuous logic has been fit in without many additional considerations in the engine. Can you log something for this?
As a workaround, I was thinking of changing our query generator to produce queries of the form
SELECT a,b,c FROM t
SELECT null, null, null
With the appropriate null ordering (I'll play around to find that), the row of nulls can be used as sentinel for the beginning or end of the result set. None of our real data sources would produce a completely null row so I feel pretty safe using this as a temporary work around. Do you see any problem with this approach?
You could use "order by a nulls [first/last], ..." to control null ordering.