Commit d90bb9a
committed
refactor: rename StreamingResultSet to DataCloudResultSet, drop marker interface
Pre-unify there were three result-set implementations: StreamingResultSet
(streaming Arrow query results), DataCloudMetadataResultSet (metadata),
SimpleResultSet (in-memory rows). The DataCloudResultSet interface — a
one-method (getQueryId) extension over java.sql.ResultSet — was the
common "implements" the public API surfaced; StreamingResultSet was the
only one that ever implemented it as a non-trivial impl.
The unify refactor collapsed all three implementations into
StreamingResultSet, but kept the interface and the "Streaming" name. Two
problems fall out:
- The "Streaming" name now lies. Metadata results flow through the same
class but they're a one-shot in-memory IPC blob — nothing streaming
about them. MetadataResultSets.of even passes /*queryId=*/ null
because there is no query.
- The DataCloudResultSet interface has one implementer and one method.
Layering an interface for one impl is just a reader trap: callers
instinctively look for "what other implementations exist" and find
none.
Collapse the two:
- Rename the class StreamingResultSet -> DataCloudResultSet.
- Delete the old DataCloudResultSet interface (the public method
getQueryId() now lives directly on the class via @Getter).
- Update all production and test references; rename the affected test
files to match (StreamingResultSet*Test -> DataCloudResultSet*Test).
The public API surface is unchanged in source for the common cases:
DataCloudConnection.getRowBasedResultSet / getChunkBasedResultSet still
return DataCloudResultSet, just as a class instead of an interface.
This is binary-incompatible for any caller that ever cast to or
implemented the old interface; in practice only StreamingResultSet
implemented it on the read side, and no code outside the driver
implemented it on the write side.1 parent acc241e commit d90bb9a
13 files changed
Lines changed: 542 additions & 555 deletions
File tree
- jdbc-core/src
- main/java/com/salesforce/datacloud/jdbc
- core
- metadata
- protocol
- test/java/com/salesforce/datacloud/jdbc
- core
- metadata
- examples
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
0 commit comments