Code review comment: it not proper to set avgSize=0 for empty table

Code under review:
public static ColumnStatistic fromResultRow(ResultRow resultRow) {
        try {
            ColumnStatisticBuilder columnStatisticBuilder = new ColumnStatisticBuilder();
            double count = Double.parseDouble(resultRow.getColumnValueWithDefault("count", "0"));
            columnStatisticBuilder.setCount(count);
            double ndv = Double.parseDouble(resultRow.getColumnValueWithDefault("ndv", "0"));
            if (0.99 * count < ndv && ndv < 1.01 * count) {
                ndv = count;
            }
            columnStatisticBuilder.setNdv(ndv);
            String nullCount = resultRow.getColumnValueWithDefault("null_count", "0");
            columnStatisticBuilder.setNumNulls(Double.parseDouble(nullCount));
            columnStatisticBuilder.setDataSize(Double
                    .parseDouble(resultRow.getColumnValueWithDefault("data_size_in_bytes", "0")));
            columnStatisticBuilder.setAvgSizeByte(columnStatisticBuilder.getCount() == 0 ?
                    0 :columnStatisticBuilder.getDataSize()
                    / columnStatisticBuilder.getCount());
            long catalogId = Long.parseLong(resultRow.getColumnValue("catalog_id"));
            long idxId = Long.parseLong(resultRow.getColumnValue("idx_id"));
            long dbID = Long.parseLong(resultRow.getColumnValue("db_id"));
            long tblId = Long.parseLong(resultRow.getColumnValue("tbl_id"));
            String colName = resultRow.getColumnValue("col_id");
            Column col = StatisticsUtil.findColumn(catalogId, dbID, tblId, idxId, colName);
            if (col == null) {
                LOG.warn("Failed to deserialize column statistics, ctlId: {} dbId: {}"
                        + "tblId: {} column: {} not exists",
                        catalogId, dbID, tblId, colName);
                return ColumnStatistic.UNKNOWN;
            }
            String min = resultRow.getColumnValue("min");
            String max = resultRow.getColumnValue("max");
            if (min != null) {
                columnStatisticBuilder.setMinValue(StatisticsUtil.convertToDouble(col.getType(), min));
                columnStatisticBuilder.setMinExpr(StatisticsUtil.readableValue(col.getType(), min));
            } else {
                columnStatisticBuilder.setMinValue(Double.MIN_VALUE);
            }
            if (max != null) {
                columnStatisticBuilder.setMaxValue(StatisticsUtil.convertToDouble(col.getType(), max));
                columnStatisticBuilder.setMaxExpr(StatisticsUtil.readableValue(col.getType(), max));
            } else {
                columnStatisticBuilder.setMaxValue(Double.MAX_VALUE);
            }
            columnStatisticBuilder.setSelectivity(1.0);
            Histogram histogram = Env.getCurrentEnv().getStatisticsCache().getHistogram(tblId, idxId, colName)
                    .orElse(null);
            columnStatisticBuilder.setHistogram(histogram);
            return columnStatisticBuilder.build();
        } catch (Exception e) {
            LOG.warn("Failed to deserialize column statistics, column not exists", e);
            return ColumnStatistic.UNKNOWN;
        }
    }

Line commented on: columnStatisticBuilder.setAvgSizeByte(columnStatisticBuilder.getCount() == 0 ?

Revised code:
public static ColumnStatistic fromResultRow(ResultRow resultRow) {
        try {
            ColumnStatisticBuilder columnStatisticBuilder = new ColumnStatisticBuilder();
            double count = Double.parseDouble(resultRow.getColumnValueWithDefault("count", "0"));
            columnStatisticBuilder.setCount(count);
            double ndv = Double.parseDouble(resultRow.getColumnValueWithDefault("ndv", "0"));
            if (0.99 * count < ndv && ndv < 1.01 * count) {
                ndv = count;
            }
            columnStatisticBuilder.setNdv(ndv);
            String nullCount = resultRow.getColumnValueWithDefault("null_count", "0");
            columnStatisticBuilder.setNumNulls(Double.parseDouble(nullCount));
            columnStatisticBuilder.setDataSize(Double
                    .parseDouble(resultRow.getColumnValueWithDefault("data_size_in_bytes", "0")));
            columnStatisticBuilder.setAvgSizeByte(columnStatisticBuilder.getCount() == 0
                    ? 0 : columnStatisticBuilder.getDataSize()
                    / columnStatisticBuilder.getCount());
            long catalogId = Long.parseLong(resultRow.getColumnValue("catalog_id"));
            long idxId = Long.parseLong(resultRow.getColumnValue("idx_id"));
            long dbID = Long.parseLong(resultRow.getColumnValue("db_id"));
            long tblId = Long.parseLong(resultRow.getColumnValue("tbl_id"));
            String colName = resultRow.getColumnValue("col_id");
            Column col = StatisticsUtil.findColumn(catalogId, dbID, tblId, idxId, colName);
            if (col == null) {
                LOG.warn("Failed to deserialize column statistics, ctlId: {} dbId: {}"
                        + "tblId: {} column: {} not exists",
                        catalogId, dbID, tblId, colName);
                return ColumnStatistic.UNKNOWN;
            }
            String min = resultRow.getColumnValue("min");
            String max = resultRow.getColumnValue("max");
            if (min != null) {
                columnStatisticBuilder.setMinValue(StatisticsUtil.convertToDouble(col.getType(), min));
                columnStatisticBuilder.setMinExpr(StatisticsUtil.readableValue(col.getType(), min));
            } else {
                columnStatisticBuilder.setMinValue(Double.MIN_VALUE);
            }
            if (max != null) {
                columnStatisticBuilder.setMaxValue(StatisticsUtil.convertToDouble(col.getType(), max));
                columnStatisticBuilder.setMaxExpr(StatisticsUtil.readableValue(col.getType(), max));
            } else {
                columnStatisticBuilder.setMaxValue(Double.MAX_VALUE);
            }
            columnStatisticBuilder.setSelectivity(1.0);
            Histogram histogram = Env.getCurrentEnv().getStatisticsCache().getHistogram(tblId, idxId, colName)
                    .orElse(null);
            columnStatisticBuilder.setHistogram(histogram);
            return columnStatisticBuilder.build();
        } catch (Exception e) {
            LOG.warn("Failed to deserialize column statistics, column not exists", e);
            return ColumnStatistic.UNKNOWN;
        }
    }