{{ message }}
Repository navigation
s3: add raw Protobuf input for typed Arrow/Parquet output - #12571
Draft
rituparnakhaund wants to merge 1 commit into
Draft
rituparnakhaund wants to merge 1 commit into
rituparnakhaund wants to merge 1 commit into
Conversation
This branch had an error being deployed
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.

s3: add raw Protobuf input for typed Arrow/Parquet output
Summary
Add an optional end-to-end raw Protobuf path to the S3 output. A Forward input
can carry each application message as a MessagePack binary field. The S3
output preserves those bytes and record boundaries in its local buffer, loads
a binary
google.protobuf.FileDescriptorSet, decodes records with Protobufreflection, builds a deterministic Arrow table, and writes Arrow or Parquet
using the existing columnar writers and compression settings.
The payload is never Base64-encoded or converted to JSON. The existing
JSON-to-Arrow path remains unchanged and is still the default.
Motivation
The current Parquet path derives types from JSON values. JSON does not preserve
important source types such as
int32versusint64,floatversusdouble,or
stringversusbytes. Inference can also vary with the observed records,and empty nested messages can produce unsupported zero-child structs.
Protobuf already has the required type information. Consuming its descriptor
and wire payload directly removes JSON schema inference from this path and
allows Parquet to expose typed nested columns.
Design
FLB_PROTOBUFbuild option.FileDescriptorSetand fully-qualified message name.DescriptorPool,DynamicMessageFactory, and reflection; generatedapplication message classes are not required.
Arrow table.
libprotocout of the runtime dependency; onlylibprotobufis linked.columnar_input_format protobufto the S3 output, with a configuredMessagePack binary key, descriptor file, and fully-qualified message name.
binvalues,retaining exact payload bytes and message boundaries across restarts.
framing-version/message-type identifier.
data or producing corrupt columnar objects.
bytes under a Parquet/Arrow object name.
Representative mappings:
int32,sint32,sfixed32int32int64,sint64,sfixed64int64float,doublefloat32,float64string,bytesutf8,binaryint32Nested
google.protobuf.Struct,Value, andListValuevalues remain opaquebinary because their recursively dynamic values do not have one finite Arrow
schema. Other recursive message schemas are rejected with a configuration
error.
Descriptor size, file count, and nesting depth are bounded. C++ exceptions are
contained at the C API boundary, invalid payloads return an error, and one
dynamic message allocation is reused across a batch.
Configuration
The application sends
WireLog.toByteArray()as thewire_protoMessagePackbinvalue in a standard Forward record. Treating an arbitrary concatenatedbyte stream as Protobuf remains unsupported because the Protobuf wire format
does not delimit top-level messages.
Testing
payload rejection
records