-
Notifications
You must be signed in to change notification settings - Fork 45
feat: add row-based immutable data structure #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
wgtmac
commented
Aug 16, 2025
- Add StructLike, MapLike, and ArrayLike interfaces
- Add wrapper for ManifestFile and ArrowArray
472f2b9
to
60b93f8
Compare
86abc4b
to
627093a
Compare
- Add StructLike, MapLike, and ArrayLike interfaces - Add wrapper for ManifestFile and ArrowArray
@@ -567,4 +567,11 @@ Result<std::vector<ManifestFile>> ManifestListReaderImpl::Files() const { | |||
return manifest_files; | |||
} | |||
|
|||
Result<ManifestFileField> ManifestFileFieldFromIndex(int32_t index) { | |||
if (index >= 0 && index < static_cast<int32_t>(ManifestFileField::kNextId)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to standardize the code format using index >= static_cast<int32_t>(ManifestFileField::kManifestPath) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? The 1st value is always at index 0 regardless of its name. Perhaps kNextId
is confusing.
@dongxiao1198 @mapleFU @zhjwpku @lidavidm Could you please take a look? |
src/iceberg/row/struct_like.h
Outdated
std::string_view, // for non-owned string, binary and fixed | ||
std::shared_ptr<StructLike>, // for struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit confusing, if we want ownership, it might be:
Scalar = variant<Literal, std::shared_ptr<StructLike>, ...>
If we don't want ownership, it would be:
<...
std::string_view,
const StructLike*,
const ArrayLike*,
...
>
Mixing string_view and sptr is so weird...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And scalar seems re-invent some member in literal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These structures are all views. I don't want any ownership for string/binary/fixed/uuid, so use std::string_view and do not reuse Literal. But we need ownership for nested struct/map/list views, so sptr is used.
/// Wrapper classes for manifest-related data structures that implement | ||
/// StructLike, ArrayLike, and MapLike interfaces for unified data access. | ||
|
||
#include <functional> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is included?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because std::reference_wrapper
is used in the header file.