RussellSpitzer commented on code in PR #14593:
URL: https://github.com/apache/iceberg/pull/14593#discussion_r2662638350
##########
api/src/main/java/org/apache/iceberg/expressions/InclusiveMetricsEvaluator.java:
##########
@@ -490,6 +506,34 @@ private boolean containsNaNsOnly(Integer id) {
&& nanCounts.get(id).equals(valueCounts.get(id));
}
+ /**
+ * Returns the column's single value if all rows contain the same value,
no nulls, no NaNs, and
+ * lower bound equals upper bound. Returns null otherwise.
+ */
+ private <T> T getUniqueValue(Bound<T> term) {
+ int id = term.ref().fieldId();
+ if (mayContainNull(id)) {
+ return null;
+ }
+
+ T lower = lowerBound(term);
+ T upper = upperBound(term);
+
+ if (lower == null || upper == null || NaNUtil.isNaN(lower) ||
NaNUtil.isNaN(upper)) {
Review Comment:
ORC :( putting Nan in my stats
--
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]