Skip to content

RemoteSchema type builders throw a bare UnsupportedOperationException with no message #7335

Closed

Description

@robfrank

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(); }  // 442

The 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 network module asserting the exception message names the SQL alternative, following the existing RemoteDatabaseTest style
  • Assert on the message text, not just the exception type - a test that only checks UnsupportedOperationException passes 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

  1. added
    enhancement
    timeseries
    network
    on Sep 9, 2026
  2. added this to the 26.10.1 milestone on Sep 10, 2026
  3. self-assigned this
    on Sep 10, 2026
  4. changed the title [-]RemoteSchema.buildTimeSeriesType() throws UnsupportedOperationException: remote type DDL is SQL-only[/-] [+]RemoteSchema type builders throw a bare UnsupportedOperationException with no message[/+] on Sep 10, 2026
  5. added
    in progress
    on Sep 16, 2026
  6. added a commit that references this issue on Sep 16, 2026
  7. robfrank commented on Sep 16, 2026

    @robfrank
    CollaboratorAuthor

    Fixed in #7656, merged to main.

    The four type builders on RemoteSchema threw a bare UnsupportedOperationException with 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


    ❤️ 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.

  8. removed
    in progress
    on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementnetworktimeseries

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions