goel-skd commented on code in PR #747:
URL: https://github.com/apache/iceberg-cpp/pull/747#discussion_r3418293838


##########
src/iceberg/expression/strict_metrics_evaluator.cc:
##########
@@ -532,9 +532,12 @@ Result<std::unique_ptr<StrictMetricsEvaluator>> 
StrictMetricsEvaluator::Make(
 }
 
 Result<bool> StrictMetricsEvaluator::Evaluate(const DataFile& data_file) const 
{
-  if (data_file.record_count <= 0) {
+  if (data_file.record_count == 0) {
     return kRowsMustMatch;
   }
+  // A negative record count is used as a sentinel for an unknown row count 
(e.g. when

Review Comment:
   Good point. Updated so only -1 is treated as the unknown sentinel. Anything 
below -1 is invalid metadata and now returns ```InvalidArgument``` rather than 
falling through. Also added a test for the invalid case.



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