Repository navigation
Description
Summary
The four type builders on RemoteSchema throw a bare UnsupportedOperationException with no message, so a caller gets a dead end that names neither the reason nor the alternative:
// network/src/main/java/com/arcadedb/remote/RemoteSchema.java
@Deprecated @Override public TypeBuilder<DocumentType> buildDocumentType() { throw new UnsupportedOperationException(); } // 425
@Deprecated @Override public TypeBuilder<VertexType> buildVertexType() { throw new UnsupportedOperationException(); } // 431
@Deprecated @Override public TypeBuilder<EdgeType> buildEdgeType() { throw new UnsupportedOperationException(); } // 437
@Override public TimeSeriesTypeBuilder buildTimeSeriesType(){ throw new UnsupportedOperationException(); } // 442The same class already does this properly a few hundred lines up:
// RemoteSchema.java:154
throw new UnsupportedOperationException("createTrigger() is not supported in remote database. Use SQL CREATE TRIGGER instead.");Scope
Give the four throws a message naming the SQL alternative, matching the createTrigger() precedent. That is the whole issue.
throw new UnsupportedOperationException(
"buildTimeSeriesType() is not supported in remote database. Use SQL CREATE TIMESERIES TYPE instead.");Remote SQL DDL works today (CreateTimeSeriesTypeStatement, SQLParser.g4), so the message points at a real, working path rather than at a second dead end.
Explicitly out of scope: making the builders actually work remotely. That was floated as "option 2" in this issue's original text and is not implementable as a message-level change - it needs a schema-API refactor, now tracked separately in #7399. Nothing here should anticipate that work.
Note on the deprecated three
buildDocumentType(), buildVertexType() and buildEdgeType() are @Deprecated; buildTimeSeriesType() is not. They are not equivalent cases and should not read as though they were: the deprecated three are legacy surface that only needs to fail legibly, while buildTimeSeriesType() is current API whose message is the one users will actually hit.
Verification
- A unit test per builder in the
networkmodule asserting the exception message names the SQL alternative, following the existingRemoteDatabaseTeststyle - Assert on the message text, not just the exception type - a test that only checks
UnsupportedOperationExceptionpasses against today's code and proves nothing
History
This issue originally proposed two options and asserted the builders were a uniform gap. Rescoped 2026-09-10 to option 1 only, after the blockers to option 2 were found and split into #7399.
Related: #7307 (where this was found; now closed), #7399 (polymorphic builders), #7305.
Activity
[-]RemoteSchema.buildTimeSeriesType() throws UnsupportedOperationException: remote type DDL is SQL-only[/-][+]RemoteSchema type builders throw a bare UnsupportedOperationException with no message[/+]feat(#7335): name the SQL alternative in RemoteSchema's type-builder …
robfrank commentedon Sep 16, 2026
Fixed in #7656, merged to
main.The four type builders on
RemoteSchemathrew a bareUnsupportedOperationExceptionwith no message, so a remote caller hit a dead end that named neither the reason nor a way forward. Each now names the method and the SQL DDL that does work remotely:buildDocumentType()→CREATE DOCUMENT TYPE,buildVertexType()→CREATE VERTEX TYPE,buildEdgeType()→CREATE EDGE TYPE,buildTimeSeriesType()→CREATE TIMESERIES TYPE. Each alternative was verified to be a real remote path, not a second dead end, and a new four-test class asserts on the message text rather than on the exception type, so it could not pass against the old code.Still open
UnsupportedOperationExceptionthrows acrossRemoteBucket,RemoteDocumentType,RemotePropertyand the rest ofRemoteSchema, including the three index builders (buildTypeIndex,buildBucketIndex,buildManualIndex) that sit in the same block. Left out because this issue was scoped to the four type builders. Remote client classes still throw 98 bare UnsupportedOperationException with no message #7654 also carries settling the class on one phrasing:RemoteSchemacurrently uses both "is not supported in remote database" and "is not supported remotely".RemoteSchemaTest.getOrCreateVertexTypeWithPageSizeThrowsUnsupportedis misnamed: it never reachesgetOrCreateVertexType, so the 3-arg overload has no coverage. Pre-existing and unaffected by this change.buildTimeSeriesType()has since been implemented remotely by Schema type builders cannot be implemented remotely: builder and its product are bound to local classes #7399 / PR feat(#7399): let the TimeSeries type builder be implemented remotely #7692, so its message is gone; the other three still throw by design.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.