wgtmac commented on code in PR #614:
URL: https://github.com/apache/iceberg-cpp/pull/614#discussion_r3180724813
##########
src/iceberg/catalog/rest/types.h:
##########
@@ -295,4 +298,73 @@ struct ICEBERG_REST_EXPORT OAuthTokenResponse {
bool operator==(const OAuthTokenResponse&) const = default;
};
+/// \brief Request to initiate a server-side scan planning operation.
+struct ICEBERG_REST_EXPORT PlanTableScanRequest {
+ std::optional<int64_t> snapshot_id;
+ std::vector<std::string> select;
+ std::shared_ptr<Expression> filter;
+ bool case_sensitive = true;
+ bool use_snapshot_schema = false;
+ std::optional<int64_t> start_snapshot_id;
+ std::optional<int64_t> end_snapshot_id;
+ std::vector<std::string> statsFields;
+ std::optional<int64_t> min_rows_required;
+
+ Status Validate() const;
+
+ bool operator==(const PlanTableScanRequest&) const;
+};
+
+/// \brief Base response containing scan tasks and delete files returned by
scan plan
+/// endpoints.
+struct ICEBERG_REST_EXPORT BaseScanTaskResponse {
+ std::vector<std::string> plan_tasks;
+ std::vector<FileScanTask> file_scan_tasks;
+ std::vector<DataFile> delete_files;
+ // std::unordered_map<std::string, PartitionSpec> specsById;
+
+ Status Validate() const { return {}; };
+
+ bool operator==(const BaseScanTaskResponse&) const;
+};
+
+/// \brief Response from initiating a scan planning operation, including plan
status and
+/// initial scan tasks.
+struct ICEBERG_REST_EXPORT PlanTableScanResponse : BaseScanTaskResponse {
+ std::string plan_status;
Review Comment:
Is it better to use an enum to define the plan status?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]