Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Correct the introduction of array element types and map key types #6261

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

CheneyYin
Copy link
Contributor

@CheneyYin CheneyYin commented Jan 21, 2024

Purpose of this pull request

There is a mistake in the #6187 documentation. This PR will correct the introduction of array element types and map key types

public class ArrayType<T, E> implements SeaTunnelDataType<T> {
private static final long serialVersionUID = 2L;
public static final ArrayType<String[], String> STRING_ARRAY_TYPE =
new ArrayType<>(String[].class, BasicType.STRING_TYPE);
public static final ArrayType<Boolean[], Boolean> BOOLEAN_ARRAY_TYPE =
new ArrayType<>(Boolean[].class, BasicType.BOOLEAN_TYPE);
public static final ArrayType<Byte[], Byte> BYTE_ARRAY_TYPE =
new ArrayType<>(Byte[].class, BasicType.BYTE_TYPE);
public static final ArrayType<Short[], Short> SHORT_ARRAY_TYPE =
new ArrayType<>(Short[].class, BasicType.SHORT_TYPE);
public static final ArrayType<Integer[], Integer> INT_ARRAY_TYPE =
new ArrayType<>(Integer[].class, BasicType.INT_TYPE);
public static final ArrayType<Long[], Long> LONG_ARRAY_TYPE =
new ArrayType<>(Long[].class, BasicType.LONG_TYPE);
public static final ArrayType<Float[], Float> FLOAT_ARRAY_TYPE =
new ArrayType<>(Float[].class, BasicType.FLOAT_TYPE);
public static final ArrayType<Double[], Double> DOUBLE_ARRAY_TYPE =
new ArrayType<>(Double[].class, BasicType.DOUBLE_TYPE);
// --------------------------------------------------------------------------------------------
private final Class<T> arrayClass;
private final BasicType<E> elementType;
private ArrayType(Class<T> arrayClass, BasicType<E> elementType) {
this.arrayClass = arrayClass;
this.elementType = elementType;
}

public class MapType<K, V> implements CompositeType<Map<K, V>> {
private static final List<SqlType> SUPPORTED_KEY_TYPES =
Arrays.asList(
SqlType.NULL,
SqlType.BOOLEAN,
SqlType.TINYINT,
SqlType.SMALLINT,
SqlType.INT,
SqlType.BIGINT,
SqlType.DATE,
SqlType.TIME,
SqlType.TIMESTAMP,
SqlType.FLOAT,
SqlType.DOUBLE,
SqlType.STRING,
SqlType.DECIMAL);

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

Sorry, something went wrong.

@CheneyYin CheneyYin marked this pull request as ready for review January 21, 2024 10:28
@hailin0 hailin0 merged commit 6073839 into apache:dev Jan 22, 2024
6 checks passed
chaorongzhi pushed a commit to chaorongzhi/seatunnel that referenced this pull request Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants