Skip to content

ESQL: Add Connector SPI and gRPC/Arrow Flight module - #142667

Merged
costin merged 10 commits into
elastic:mainfrom
costin:esql/connector-spi
Feb 22, 2026
Merged

costin merged 10 commits into
elastic:mainfrom
costin:esql/connector-spi

Conversation

@costin

@costin costin commented Feb 18, 2026

Copy link
Copy Markdown
Member

Extend the external data source framework with a request/response
Connector SPI for services that return data over a network protocol.
Implement the first connector for Apache Arrow Flight over gRPC.

  • ConnectorFactory/Connector/ResultCursor: new SPI interfaces for
    connection-oriented external sources
  • AsyncConnectorSourceOperatorFactory: async operator that drains a
    connector on a background thread with backpressure
  • OperatorFactoryRegistry: dispatches ConnectorFactory via the
    ExternalSourceFactory hierarchy
  • FlightConnectorFactory/FlightConnector: Arrow Flight implementation
    with schema resolution and streaming result cursor
  • FlightTypeMapping: Arrow-to-ESQL type conversion
  • GrpcDataSourcePlugin: plugin wiring via ServiceLoader
  • EmployeeFlightServer: in-memory test fixture serving employee data
  • FlightFormatSpecIT: integration tests via csv-spec against a live
    Flight server
  • ExternalSourceDrainUtils: shared drain loop with timeout
  • entitlement-policy.yaml: grants manage_threads and outbound_network

Developed using AI-assisted tooling

Extend the external data source framework with a request/response
Connector SPI for services that return data over a network protocol.
Implement the first connector for Apache Arrow Flight over gRPC.

- ConnectorFactory/Connector/ResultCursor: new SPI interfaces for
  connection-oriented external sources
- AsyncConnectorSourceOperatorFactory: async operator that drains a
  connector on a background thread with backpressure
- OperatorFactoryRegistry: dispatches ConnectorFactory via the
  ExternalSourceFactory hierarchy
- FlightConnectorFactory/FlightConnector: Arrow Flight implementation
  with schema resolution and streaming result cursor
- FlightTypeMapping: Arrow-to-ESQL type conversion
- GrpcDataSourcePlugin: plugin wiring via ServiceLoader
- EmployeeFlightServer: in-memory test fixture serving employee data
- FlightFormatSpecIT: integration tests via csv-spec against a live
  Flight server
- ExternalSourceDrainUtils: shared drain loop with timeout
- entitlement-policy.yaml: grants manage_threads and outbound_network

Developed using AI-assisted tooling
@costin
costin requested a review from a team as a code owner February 18, 2026 22:15
@costin
costin requested a review from bpintea February 18, 2026 22:15
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0 labels Feb 18, 2026
@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine

Copy link
Copy Markdown
Collaborator

Hi @costin, I've created a changelog YAML for you.

costin and others added 4 commits February 18, 2026 14:16
- Add internal-test-artifact plugin so QA can resolve test sources
- Add lintian codeless-jar override for grpc-context metadata jar
- remove unused licenses
@costin
costin force-pushed the esql/connector-spi branch from fc0e227 to 754e5cd Compare February 20, 2026 15:18
FileSourceFactory was only registered under "file" but format readers
return their format name (e.g. "parquet", "csv") as the sourceType.
Register the fallback factory under each format name so the operator
factory registry can find it at execution time.
IcebergTableCatalog.canHandle() claims all S3 paths, intercepting
plain CSV/Parquet files before FileSourceFactory gets a chance.
Change resolveSingleSource() to try-and-continue: if a factory claims
canHandle() but fails in resolveMetadata(), fall through to the next
factory instead of propagating the error immediately.

- ExternalSourceResolver: catch-and-continue in resolution loop
@costin

costin commented Feb 20, 2026

Copy link
Copy Markdown
Member Author

@elasticmachine run elasticsearch-ci/part-1

@costin
costin merged commit c4f91f1 into elastic:main Feb 22, 2026
35 checks passed
@costin
costin deleted the esql/connector-spi branch February 22, 2026 12:55
PeteGillinElastic pushed a commit to PeteGillinElastic/elasticsearch that referenced this pull request Feb 23, 2026
Extend the external data source framework with a request/response
Connector SPI for services that return data over a network protocol.
Implement the first connector for Apache Arrow Flight over gRPC.

ConnectorFactory/Connector/ResultCursor: new SPI interfaces for
connection-oriented external sources
AsyncConnectorSourceOperatorFactory: async operator that drains a
connector on a background thread with backpressure
OperatorFactoryRegistry: dispatches ConnectorFactory via the
ExternalSourceFactory hierarchy
FlightConnectorFactory/FlightConnector: Arrow Flight implementation
with schema resolution and streaming result cursor
FlightTypeMapping: Arrow-to-ESQL type conversion
GrpcDataSourcePlugin: plugin wiring via ServiceLoader
EmployeeFlightServer: in-memory test fixture serving employee data
FlightFormatSpecIT: integration tests via csv-spec against a live
Flight server
ExternalSourceDrainUtils: shared drain loop with timeout
entitlement-policy.yaml: grants manage_threads and outbound_network

Developed using AI-assisted tooling
@tylerperk tylerperk added the ES|QL|DS ES|QL datasources label Mar 18, 2026
elasticsearchmachine pushed a commit that referenced this pull request Jul 16, 2026
… test (#154075)

## Summary

- Excludes `grpc-context` from the `esql-datasource-grpc` plugin's runtime classpath so it is not bundled into the deb package
- Removes the now-unnecessary lintian override for `codeless-jar` on that path
- Unmutes `DebMetadataTests#test05CheckLintian`

## Background

Since gRPC Java 1.57.0, `grpc-context` is intentionally an empty JAR —
all classes were moved to `grpc-api` to fix a JPMS split-package issue
([grpc/grpc-java#3522](grpc/grpc-java#3522)).
The `grpc-context` artifact now exists solely as a backward-compatible
Maven coordinate that pulls in `grpc-api`.

`grpc-api:1.78.0` (directly declared in `esql-datasource-grpc`)
transitively pulls `grpc-context:1.78.0` into the plugin bundle. Lintian
flags this empty jar with a `codeless-jar` warning, failing the
packaging test.

A lintian override was added in #142667 but proved ineffective on CI
Ubuntu 2204/2404 (lintian reported `0 hints overridden; 9 unused
overrides`). The correct fix is to not ship the jar at all.

This mirrors the approach already used in `esql-datasource-gcs`, which
excludes `grpc-context` for the same reason.

Closes #142819
elasticsearchmachine pushed a commit that referenced this pull request Jul 16, 2026
… test (#154075) (#154109)

## Summary

- Excludes `grpc-context` from the `esql-datasource-grpc` plugin's runtime classpath so it is not bundled into the deb package
- Removes the now-unnecessary lintian override for `codeless-jar` on that path
- Unmutes `DebMetadataTests#test05CheckLintian`

## Background

Since gRPC Java 1.57.0, `grpc-context` is intentionally an empty JAR —
all classes were moved to `grpc-api` to fix a JPMS split-package issue
([grpc/grpc-java#3522](grpc/grpc-java#3522)).
The `grpc-context` artifact now exists solely as a backward-compatible
Maven coordinate that pulls in `grpc-api`.

`grpc-api:1.78.0` (directly declared in `esql-datasource-grpc`)
transitively pulls `grpc-context:1.78.0` into the plugin bundle. Lintian
flags this empty jar with a `codeless-jar` warning, failing the
packaging test.

A lintian override was added in #142667 but proved ineffective on CI
Ubuntu 2204/2404 (lintian reported `0 hints overridden; 9 unused
overrides`). The correct fix is to not ship the jar at all.

This mirrors the approach already used in `esql-datasource-gcs`, which
excludes `grpc-context` for the same reason.

Closes #142819
elasticsearchmachine pushed a commit that referenced this pull request Sep 18, 2026
… test (#154075) (#159696)

## Summary

- Excludes `grpc-context` from the `esql-datasource-grpc` plugin's runtime classpath so it is not bundled into the deb package
- Removes the now-unnecessary lintian override for `codeless-jar` on that path
- Unmutes `DebMetadataTests#test05CheckLintian`

## Background

Since gRPC Java 1.57.0, `grpc-context` is intentionally an empty JAR —
all classes were moved to `grpc-api` to fix a JPMS split-package issue
([grpc/grpc-java#3522](grpc/grpc-java#3522)).
The `grpc-context` artifact now exists solely as a backward-compatible
Maven coordinate that pulls in `grpc-api`.

`grpc-api:1.78.0` (directly declared in `esql-datasource-grpc`)
transitively pulls `grpc-context:1.78.0` into the plugin bundle. Lintian
flags this empty jar with a `codeless-jar` warning, failing the
packaging test.

A lintian override was added in #142667 but proved ineffective on CI
Ubuntu 2204/2404 (lintian reported `0 hints overridden; 9 unused
overrides`). The correct fix is to not ship the jar at all.

This mirrors the approach already used in `esql-datasource-gcs`, which
excludes `grpc-context` for the same reason.

Closes #142819

(cherry picked from commit b7b9dcd)

# Conflicts:
#	muted-tests.yml

Co-authored-by: Rene Groeschke <rene@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >enhancement ES|QL|DS ES|QL datasources Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants