class TableSummarizer extends BaseSummarizer {

    public static TableSummarizer merge(TableSummarizer left, TableSummarizer right) {
        if (right.count == 0) {
            return left;
        }

        if (left.count == 0) {
            return right.copy();
        }

        left.count += right.count;
        left.numMissingValue.plusEqual(right.numMissingValue);
        left.sum.plusEqual(right.sum);
        left.squareSum.plusEqual(right.squareSum);
        left.normL1.plusEqual(right.normL1);
        MatVecOp.apply(left.min, right.min, left.min, Math::min);
        MatVecOp.apply(left.max, right.max, left.max, Math::max);

        if (left.outerProduct != null && right.outerProduct != null) {
            left.outerProduct.plusEquals(right.outerProduct);
            left.xSum.plusEquals(right.xSum);
            left.xSquareSum.plusEquals(right.xSquareSum);
            left.xyCount.plusEquals(right.xyCount);
        } else if (left.outerProduct == null && right.outerProduct != null) {
            left.outerProduct = right.outerProduct.clone();
            left.xSum = right.xSum.clone();
            left.xSquareSum = right.xSquareSum.clone();
            left.xyCount = right.xyCount.clone();
        }

        return left;
    }

    private  TableSummarizer();
    public  TableSummarizer(String[] selectedColNames, int[] numericalColIndices, boolean calculateOuterProduct);

}