This is an automated email from the ASF dual-hosted git repository. kurt pushed a commit to branch release-1.10 in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.10 by this push: new 62f0303 [FLINK-15231][table-runtime-blink] Remove useless methods in AbstractHeapVector 62f0303 is described below commit 62f0303f07120c51317aff171f105ecb0c65a2be Author: Zhenghua Gao <doc...@gmail.com> AuthorDate: Tue Dec 31 11:49:43 2019 +0800 [FLINK-15231][table-runtime-blink] Remove useless methods in AbstractHeapVector This closes #10562 --- .../dataformat/vector/heap/AbstractHeapVector.java | 50 ---------------------- 1 file changed, 50 deletions(-) diff --git a/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/vector/heap/AbstractHeapVector.java b/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/vector/heap/AbstractHeapVector.java index d64bebc..af864df 100644 --- a/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/vector/heap/AbstractHeapVector.java +++ b/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/vector/heap/AbstractHeapVector.java @@ -18,10 +18,7 @@ package org.apache.flink.table.dataformat.vector.heap; -import org.apache.flink.table.dataformat.Decimal; import org.apache.flink.table.dataformat.vector.AbstractColumnVector; -import org.apache.flink.table.types.logical.DecimalType; -import org.apache.flink.table.types.logical.LogicalType; import java.util.Arrays; @@ -85,51 +82,4 @@ public abstract class AbstractHeapVector extends AbstractColumnVector { public HeapIntVector getDictionaryIds() { return dictionaryIds; } - - public static AbstractHeapVector[] allocateHeapVectors(LogicalType[] fieldTypes, int maxRows) { - AbstractHeapVector[] columns = new AbstractHeapVector[fieldTypes.length]; - for (int i = 0; i < fieldTypes.length; i++) { - columns[i] = createHeapColumn(fieldTypes[i], maxRows); - } - return columns; - } - - public static AbstractHeapVector createHeapColumn(LogicalType fieldType, int maxRows) { - switch (fieldType.getTypeRoot()) { - case BOOLEAN: - return new HeapBooleanVector(maxRows); - case TINYINT: - return new HeapByteVector(maxRows); - case DOUBLE: - return new HeapDoubleVector(maxRows); - case FLOAT: - return new HeapFloatVector(maxRows); - case INTEGER: - case DATE: - case TIME_WITHOUT_TIME_ZONE: - return new HeapIntVector(maxRows); - case BIGINT: - case TIMESTAMP_WITHOUT_TIME_ZONE: - case TIMESTAMP_WITH_LOCAL_TIME_ZONE: - return new HeapLongVector(maxRows); - case DECIMAL: - DecimalType decimalType = (DecimalType) fieldType; - if (Decimal.is32BitDecimal(decimalType.getPrecision())) { - return new HeapIntVector(maxRows); - } else if (Decimal.is64BitDecimal(decimalType.getPrecision())) { - return new HeapLongVector(maxRows); - } else { - return new HeapBytesVector(maxRows); - } - case SMALLINT: - return new HeapShortVector(maxRows); - case CHAR: - case VARCHAR: - case BINARY: - case VARBINARY: - return new HeapBytesVector(maxRows); - default: - throw new UnsupportedOperationException(fieldType + " is not supported now."); - } - } }