wgtmac commented on code in PR #976:
URL: https://github.com/apache/iceberg-cpp/pull/976#discussion_r4272721592


##########
src/iceberg/json_serde.cc:
##########
@@ -2423,8 +2423,8 @@ Result<nlohmann::json> ToJson(
   }
   json[kSpec] = ToJson(*spec_it->second);
   json[kDataFile] = std::move(data_file_json);
-  json[kStart] = 0;
-  json[kLength] = task.data_file()->file_size_in_bytes;
+  json[kStart] = task.start();

Review Comment:
   Please revalidate the range here, as the REST serializer does. If a shared 
DataFile's size is changed after MakeSplit (for example, from 100 to 90 for 
[40,100)), this returns successful JSON that FileScanTaskFromJson rejects. Add 
the same changed-size regression test to the standalone serializer.



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