Skip to content

Handle missing schema gracefully in REST Connector #4

Description

@banickn

Context: In crates/connectors/src/sources/rest.rs (around line 260), there is a TODO: Build schema from config if provided. When a REST endpoint returns an empty JSON array [], Arrow inference fails because there are no fields.

Task:

  1. Locate crates/connectors/src/sources/rest.rs.
  2. Check if the RestSource configuration struct has a schema field provided. If schema is defined in the config, use it to instantiate an empty RecordBatch instead of failing inference when the response is [].
  3. Add a simple test case in the same file #[cfg(test)] module verifying that an empty response with a predefined schema succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions