protocol: add v2 protocol design - #18
Draft
tkilias wants to merge 21 commits into
Draft
Conversation
Make the high-level column definition the single source for Exasol type parameters and link to its Call Metadata contract from the Arrow mapping document. Remove repeated property ownership text and legacy exasol field metadata from the mapping examples. Keep only conversion-specific GeoArrow and interval extension metadata, and update validation assertions and rendered mapping documentation accordingly.
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
tkilias
commented
Aug 28, 2026
| | `TIMESTAMP` | `Timestamp(unit, "")` | Select the smallest unit preserving declared precision. | | ||
| | `TIMESTAMP WITH LOCAL TIME ZONE` | `Timestamp(unit, "UTC")` | Normalize Exasol's UTC-normalized value for transport. | | ||
| | `DATE` | `Date(Day)` | Preserve calendar-day semantics. | | ||
| | `CHAR` | `Utf8` | Preserve fixed-length padding and character metadata as Exasol semantics. | |
Collaborator
Author
There was a problem hiding this comment.
we are not sending the padding or receiving the padding
tkilias
commented
Aug 28, 2026
| - `DOUBLE PRECISION` maps to `FloatingPoint(Double)`. | ||
| - `1 <= p <= 9` maps to `Decimal(32)` with `bit_width = 32`. | ||
| - `10 <= p <= 18` maps to `Decimal(64)` with `bit_width = 64`. | ||
| - `19 <= p <= 36` maps to `Decimal(128)` with `bit_width = 128`. |
Collaborator
Author
There was a problem hiding this comment.
Suggested change
| - `19 <= p <= 36` maps to `Decimal(128)` with `bit_width = 128`. | |
| - `19 <= p <= 38` maps to `Decimal(128)` with `bit_width = 128`. |
tkilias
commented
Aug 28, 2026
Comment on lines
+24
to
+40
| Every `Run` and Function call uses one `call_metadata` JSON payload. It may be sent on control stream `0` before any | ||
| call is sent or between calls, or in the same `StreamMessage` as `OpenCall`. It conforms to | ||
| [call_metadata.schema.json](../../../../../udf-runner-cpp/v2/json_schema/call_metadata.schema.json) and supplies the | ||
| per-invocation execution context and iterator settings. Metadata sent before any call or between calls applies to | ||
| subsequent calls. Metadata sent with `OpenCall` applies to that call and subsequent calls. The latest received value | ||
| replaces the previous value. It is not sent during an active call. | ||
|
|
||
| Column definitions are carried separately in one `column_metadata` JSON payload. It conforms to | ||
| [column_metadata.schema.json](../../../../../udf-runner-cpp/v2/json_schema/column_metadata.schema.json) and may be | ||
| sent on control stream `0` before any call is sent or between calls, or in the same `StreamMessage` as `OpenCall`. | ||
| Metadata sent before any call or between calls applies to subsequent calls. Metadata sent with `OpenCall` applies to | ||
| that call and subsequent calls. The latest received value replaces the previous value. It is not sent during an active | ||
| call. Column `type` values use official Exasol type families, while `type_name` carries the | ||
| complete parameterized Exasol SQL declaration. Their Arrow physical representation and metadata rules are defined in | ||
| [type_mapping.md](type_mapping.md). The shared column-definition contract is defined in | ||
| [column.schema.json](../../../../../udf-runner-cpp/v2/json_schema/column.schema.json) and is referenced by both column | ||
| metadata and import specifications. |
Collaborator
Author
There was a problem hiding this comment.
the rule for when the metadata can be sent and when it is valid or get overriden is identical can be explained ones
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the v2 UDF protocol design and FlatBuffer schema.
The design separates low-level transport rules, generic call lifecycle, generic data-stream behavior, and high-level DB/UDFRunner orchestration. It includes Mermaid source diagrams and their rendered SVGs.
Impact
Defines the proposed v2 protocol contract, including framing, stream ownership, schema and record-batch ordering, flow control, transport bindings, close semantics, and high-level call behavior.
Validation
git diff --checkbefore squashing the branch.