Repository navigation
python(feat): add client side detect config for parquet - #819
Merged
alden-sift merged 22 commits intoOct 23, 2026
Merged
alden-sift merged 22 commits into
alden-sift merged 22 commits into
Conversation
Contributor
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-819/ Deployed from |
Detect PARQUET_FLATDATASET import configs locally from the Parquet footer schema with pyarrow instead of calling the server DetectConfig endpoint. Detection matches the server: struct fields are flattened, the first top-level time typed column is the time column, and configs embedded by Sift exports are used directly. The time column is excluded from the data columns, and an INT64/UINT64 column named ts, timestamp, or time is used when no time typed column exists. Add relative_start_time to detect_config and import_from_path. It applies to Parquet only and warns when ignored for other formats or absolute time formats. Add a parquet extra for pyarrow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Python 3.8 resolves pyarrow 17, which cannot build float16 arrays from Python floats or write view types to Parquet. Build the float16 column from numpy values and move the view types into a test that is skipped when the installed pyarrow cannot write them.
alden-sift
marked this pull request as ready for review
October 9, 2026 22:39
Co-authored-by: Alex Luck <luck@siftstack.com>
Import config fields accept a pd.Timestamp alongside datetime, and configs read from protos return a pd.Timestamp so nanoseconds survive a round trip. detect_config and import_from_path also accept an ISO 8601 string, parsed with pd.Timestamp.
TimeFormat gains UNSPECIFIED, matching the proto's TIME_FORMAT_UNSPECIFIED. A CSV DetectConfig response without a detected format no longer raises; detect_config applies the caller's time_format or ABSOLUTE_UNIX_NANOSECONDS instead. Importing with an unspecified format raises the existing "format must be set" errors.
Drop UNSPECIFIED from the public TimeFormat enum. CsvImportConfig maps the proto's TIME_FORMAT_UNSPECIFIED to None, matching Parquet, TDMS, and HDF5. TimeColumnBase.format now defaults to None, so CSV and Parquet time columns share the same rule: optional at construction, required at import.
…nto import configs
…arquet-config-detection-client-side-in
alexluck-sift
approved these changes
Oct 21, 2026
alden-sift
deleted the
eng-12274-implement-parquet-config-detection-client-side-in
branch
October 23, 2026 21:11
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
Flat dataset Parquet config detection fails for wide files (many columns and/or long column names) because the client sends the Parquet footer to the server's
DetectConfigendpoint, and footers over the server's 20 MiB gRPC receive limit are rejected withRESOURCE_EXHAUSTED.This PR detects
PARQUET_FLATDATASETconfigs on the client from the footer schema with pyarrow, the same way HDF5, TDMS, ULog, and MCAP configs are detected. Single channel per row Parquet still uses server detection.detect_configandimport_from_pathnow also acceptrelative_start_timeso files with relative time can be detected and imported without editing the config.Also refactored by moving helper functions either into
_internalmodule or moved them intoImportConfigas methods.Dependency change: flat dataset Parquet detection now requires pyarrow. Install it with
pip install sift-stack-py[parquet].Validation
Recreation
detect_configon a Parquet file with 20,000 columns and long column names:Before this change:
After this change:
Behavior validation
_tests/_internal/test_parquet.py.