Kikyou1997 commented on code in PR #8864:
URL: https://github.com/apache/doris/pull/8864#discussion_r979964422
##########
fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStats.java:
##########
@@ -72,16 +75,94 @@ public class ColumnStats {
private float avgSize = -1; // in bytes
private long maxSize = -1; // in bytes
private long numNulls = -1;
- private LiteralExpr minValue;
- private LiteralExpr maxValue;
-
- public static ColumnStats createDefaultColumnStats() {
- ColumnStats columnStats = new ColumnStats();
- columnStats.setAvgSize(1);
- columnStats.setMaxSize(1);
- columnStats.setNdv(1);
- columnStats.setNumNulls(0);
- return columnStats;
+
+ private LiteralExpr minValue = new NullLiteral();
+ private LiteralExpr maxValue = new NullLiteral();
+
+ /**
+ * Return default column statistic.
+ */
+ public static ColumnStats getDefaultColumnStats() {
+ return new ColumnStats();
+ }
+
+ /**
+ * Merge column statistics(the original statistics should not be modified)
+ *
+ * @param left statistics to be merged
+ * @param right statistics to be merged
+ */
+ public static ColumnStats aggColumnStats(ColumnStats left, ColumnStats
right) {
Review Comment:
rename this method to `mergeColumnStats`?
--
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]