-
Notifications
You must be signed in to change notification settings - Fork 69
refactor: remove -isystem on local include header files #211
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,11 +87,11 @@ struct ICEBERG_EXPORT TableMetadata { | |
| /// The highest assigned column ID for the table | ||
| int32_t last_column_id; | ||
| /// A list of schemas | ||
| std::vector<std::shared_ptr<Schema>> schemas; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is necessary since we are inside a iceberg namespace here, same for the below.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we don't add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/apache/iceberg-cpp/actions/runs/17463347891/job/49593031029?pr=211 In file included from /home/runner/work/iceberg-cpp/iceberg-cpp/src/iceberg/catalog/in_memory_catalog.cc:27:
/home/runner/work/iceberg-cpp/iceberg-cpp/src/iceberg/table_metadata.h:125:35: error: declaration of ‘iceberg::Result<std::shared_ptr<iceberg::Schema> > iceberg::TableMetadata::Schema() const’ changes meaning of ‘Schema’ [-Wchanges-meaning]
125 | Result<std::shared_ptr<Schema>> Schema() const;
| ^~~~~~ |
||
| std::vector<std::shared_ptr<iceberg::Schema>> schemas; | ||
| /// ID of the table's current schema | ||
| std::optional<int32_t> current_schema_id; | ||
| /// A list of partition specs | ||
| std::vector<std::shared_ptr<PartitionSpec>> partition_specs; | ||
| std::vector<std::shared_ptr<iceberg::PartitionSpec>> partition_specs; | ||
| /// ID of the current partition spec that writers should use by default | ||
| int32_t default_spec_id; | ||
| /// The highest assigned partition field ID across all partition specs for the table | ||
|
|
@@ -101,15 +101,15 @@ struct ICEBERG_EXPORT TableMetadata { | |
| /// ID of the current table snapshot | ||
| int64_t current_snapshot_id; | ||
| /// A list of valid snapshots | ||
| std::vector<std::shared_ptr<Snapshot>> snapshots; | ||
| std::vector<std::shared_ptr<iceberg::Snapshot>> snapshots; | ||
| /// A list of timestamp and snapshot ID pairs that encodes changes to the current | ||
| /// snapshot for the table | ||
| std::vector<SnapshotLogEntry> snapshot_log; | ||
| /// A list of timestamp and metadata file location pairs that encodes changes to the | ||
| /// previous metadata files for the table | ||
| std::vector<MetadataLogEntry> metadata_log; | ||
| /// A list of sort orders | ||
| std::vector<std::shared_ptr<SortOrder>> sort_orders; | ||
| std::vector<std::shared_ptr<iceberg::SortOrder>> sort_orders; | ||
| /// Default sort order id of the table | ||
| int32_t default_sort_order_id; | ||
| /// A map of snapshot references | ||
|
|
@@ -122,16 +122,16 @@ struct ICEBERG_EXPORT TableMetadata { | |
| int64_t next_row_id; | ||
|
|
||
| /// \brief Get the current schema, return NotFoundError if not found | ||
| Result<std::shared_ptr<Schema>> Schema() const; | ||
| Result<std::shared_ptr<iceberg::Schema>> Schema() const; | ||
| /// \brief Get the current schema by ID, return NotFoundError if not found | ||
| Result<std::shared_ptr<iceberg::Schema>> SchemaById( | ||
| const std::optional<int32_t>& schema_id) const; | ||
| /// \brief Get the current partition spec, return NotFoundError if not found | ||
| Result<std::shared_ptr<PartitionSpec>> PartitionSpec() const; | ||
| Result<std::shared_ptr<iceberg::PartitionSpec>> PartitionSpec() const; | ||
| /// \brief Get the current sort order, return NotFoundError if not found | ||
| Result<std::shared_ptr<SortOrder>> SortOrder() const; | ||
| Result<std::shared_ptr<iceberg::SortOrder>> SortOrder() const; | ||
| /// \brief Get the current snapshot, return NotFoundError if not found | ||
| Result<std::shared_ptr<Snapshot>> Snapshot() const; | ||
| Result<std::shared_ptr<iceberg::Snapshot>> Snapshot() const; | ||
| /// \brief Get the snapshot of this table with the given id | ||
| Result<std::shared_ptr<iceberg::Snapshot>> SnapshotById(int64_t snapshot_id) const; | ||
|
|
||
|
|
@@ -145,7 +145,7 @@ ICEBERG_EXPORT std::string ToString(const SnapshotLogEntry& entry); | |
| ICEBERG_EXPORT std::string ToString(const MetadataLogEntry& entry); | ||
|
|
||
| /// \brief The codec type of the table metadata file. | ||
| ICEBERG_EXPORT enum class MetadataFileCodecType { | ||
| enum class ICEBERG_EXPORT MetadataFileCodecType { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/apache/iceberg-cpp/actions/runs/17463347891/job/49593031039 In file included from /home/runner/work/iceberg-cpp/iceberg-cpp/src/iceberg/catalog/in_memory_catalog.cc:27:
/home/runner/work/iceberg-cpp/iceberg-cpp/src/iceberg/table_metadata.h:148:27: error: attribute ignored in declaration of ‘enum class iceberg::MetadataFileCodecType’ [-Werror=attributes]
148 | ICEBERG_EXPORT enum class MetadataFileCodecType {
| ^~~~~~~~~~~~~~~~~~~~~
/home/runner/work/iceberg-cpp/iceberg-cpp/src/iceberg/table_metadata.h:148:27: note: attribute for ‘enum class iceberg::MetadataFileCodecType’ must follow the ‘enum class’ keyword |
||
| kNone, | ||
| kGzip, | ||
| }; | ||
|
|
||
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.
@raulcd I think I just copied the same thing from Apache Arrow. Do you have any idea why it was added there?
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.
I read arrow's cmake files. It doesn't use the parameter
EXTRA_INCLUDESofadd_arrow_lib. So maybe we misunderstand the meaning ofEXTRA_INCLUDESand we should modify the caller ofadd_iceberg_libinstead of here.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.
Adding these header files as build time dependencies makes it easier for
libiceberg-bundleand unit test executables to find them. But I also think we don't need to addSYSTEMto them in this case.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.
This was added ~7 years ago here:
apache/arrow@5c97cd6
I also think
SYSTEMis not required, we could try removing it on ARROW too and validate CI, Python bindings builds, etcetera.