gsandeep1241 commented on code in PR #614:
URL: https://github.com/apache/iceberg-cpp/pull/614#discussion_r3255595351


##########
src/iceberg/catalog/rest/json_serde_internal.h:
##########
@@ -62,4 +66,26 @@ ICEBERG_DECLARE_JSON_SERDE(OAuthTokenResponse)
 
 #undef ICEBERG_DECLARE_JSON_SERDE
 
+ICEBERG_REST_EXPORT Result<PlanTableScanResponse> 
PlanTableScanResponseFromJson(

Review Comment:
   Done!



##########
src/iceberg/json_serde_internal.h:
##########
@@ -413,4 +417,39 @@ ICEBERG_EXPORT nlohmann::json ToJson(const 
TableRequirement& requirement);
 ICEBERG_EXPORT Result<std::unique_ptr<TableRequirement>> 
TableRequirementFromJson(
     const nlohmann::json& json);
 
+/// \brief Deserializes a JSON object into a `DataFile` object.
+///
+/// Parses a DataFile from the REST Catalog JSON format. Maps (column-sizes,
+/// value-counts, etc.) use the CountMap/BinaryMap parallel arrays format.
+/// Binary fields (lower-bounds, upper-bounds, key-metadata) are 
base64-encoded.
+///
+/// \param json The JSON object representing a `DataFile`.
+/// \param partitionSpecById Map from spec ID to PartitionSpec for type-aware 
partition
+/// parsing.
+/// \param schema The table schema, used with partitionSpecById to resolve 
partition
+/// types.
+/// \return A `DataFile` object or an error if the conversion fails.
+ICEBERG_EXPORT Result<DataFile> DataFileFromJson(const nlohmann::json& json);
+
+ICEBERG_EXPORT Result<DataFile> DataFileFromJson(
+    const nlohmann::json& json,
+    const std::unordered_map<int32_t, std::shared_ptr<PartitionSpec>>& 
partitionSpecById,

Review Comment:
   Done!



##########
src/iceberg/json_serde_internal.h:
##########
@@ -413,4 +417,39 @@ ICEBERG_EXPORT nlohmann::json ToJson(const 
TableRequirement& requirement);
 ICEBERG_EXPORT Result<std::unique_ptr<TableRequirement>> 
TableRequirementFromJson(
     const nlohmann::json& json);
 
+/// \brief Deserializes a JSON object into a `DataFile` object.
+///
+/// Parses a DataFile from the REST Catalog JSON format. Maps (column-sizes,
+/// value-counts, etc.) use the CountMap/BinaryMap parallel arrays format.
+/// Binary fields (lower-bounds, upper-bounds, key-metadata) are 
base64-encoded.
+///
+/// \param json The JSON object representing a `DataFile`.
+/// \param partitionSpecById Map from spec ID to PartitionSpec for type-aware 
partition
+/// parsing.
+/// \param schema The table schema, used with partitionSpecById to resolve 
partition
+/// types.
+/// \return A `DataFile` object or an error if the conversion fails.
+ICEBERG_EXPORT Result<DataFile> DataFileFromJson(const nlohmann::json& json);

Review Comment:
   Done.



##########
src/iceberg/json_serde_internal.h:
##########
@@ -413,4 +417,39 @@ ICEBERG_EXPORT nlohmann::json ToJson(const 
TableRequirement& requirement);
 ICEBERG_EXPORT Result<std::unique_ptr<TableRequirement>> 
TableRequirementFromJson(
     const nlohmann::json& json);
 
+/// \brief Deserializes a JSON object into a `DataFile` object.
+///
+/// Parses a DataFile from the REST Catalog JSON format. Maps (column-sizes,
+/// value-counts, etc.) use the CountMap/BinaryMap parallel arrays format.
+/// Binary fields (lower-bounds, upper-bounds, key-metadata) are 
base64-encoded.
+///
+/// \param json The JSON object representing a `DataFile`.
+/// \param partitionSpecById Map from spec ID to PartitionSpec for type-aware 
partition
+/// parsing.
+/// \param schema The table schema, used with partitionSpecById to resolve 
partition
+/// types.
+/// \return A `DataFile` object or an error if the conversion fails.
+ICEBERG_EXPORT Result<DataFile> DataFileFromJson(const nlohmann::json& json);
+
+ICEBERG_EXPORT Result<DataFile> DataFileFromJson(

Review Comment:
   Done!



-- 
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]

Reply via email to