Open
Conversation
Contributor
Author
|
@luoyuxia @zhaohaidao |
There was a problem hiding this comment.
Pull request overview
Adds end-to-end temporal type (Date/Time/Timestamp/TimestampLtz) support to the C++ bindings by introducing C++ wrapper types and extending the Rust<->C++ FFI conversions to correctly encode/decode temporal values, including LTZ vs NTZ disambiguation during reads (including projected scans).
Changes:
- Add temporal
DatumTypevalues and map them on the Rust FFI conversion paths (row->core and core->row). - Disambiguate
TimestampNtzvsTimestampLtzon the read path using the Fluss schema columns (and keep this correct under projection). - Introduce C++
Date/Time/Timestampwrapper types and extend the C++ example to exercise temporal writes/reads and projection.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| bindings/cpp/src/types.rs | Adds temporal datum types and packs/unpacks Arrow temporal arrays into existing FfiDatum fields; uses schema columns to distinguish NTZ vs LTZ. |
| bindings/cpp/src/lib.rs | Tracks projected columns in LogScanner and passes them into scan-record conversion to keep temporal disambiguation correct under projection. |
| bindings/cpp/src/table.cpp | Implements Date decomposition/factory functions used by the C++ API. |
| bindings/cpp/include/fluss.hpp | Adds C++ temporal wrapper types plus Datum/GenericRow helpers for temporal values. |
| bindings/cpp/examples/example.cpp | Extends example to write/read temporal columns and validate type behavior under full scan and projection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
added macro for correct time functions and out of bounds check |
Contributor
|
@fresh-borzoni Thanks for your pr. LGTM |
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
closes #252
Date,Time,Timestamp) with factory methods (FromYMD,FromHMS,FromTimePoint, etc.) and decomposition accessorsFfiDatumfields (no struct changes)TimestampNtzvsTimestampLtz(Arrow loses this distinction)