You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "ColdL (via GitHub)" <gi...@apache.org> on 2026/02/04 04:14:09 UTC
[PR] add vector type definition, add APIs in DataGetters/DataTypeVisitor, … [paimon]
ColdL opened a new pull request, #7204:
URL: https://github.com/apache/paimon/pull/7204
…add basic impls
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add vector type definition and basic APIs / Implements [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #7204:
URL: https://github.com/apache/paimon/pull/7204#discussion_r2762901391
##########
paimon-api/src/main/java/org/apache/paimon/types/VectorType.java:
##########
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.types;
+
+import org.apache.paimon.annotation.Public;
+import org.apache.paimon.utils.Preconditions;
+
+import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonGenerator;
+
+import java.io.IOException;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * Data type of fixed-size vector type. The elements are densely stored.
+ *
+ * @since 2.0.0
+ */
+@Public
+public class VectorType extends DataType {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final int MIN_LENGTH = 1;
+
+ public static final int MAX_LENGTH = Integer.MAX_VALUE;
+
+ public static final String FORMAT = "VECTOR<%s, %d>";
+
+ private final DataType elementType;
+
+ private final int length;
+
+ public VectorType(boolean isNullable, int length, DataType elementType) {
+ super(isNullable, DataTypeRoot.VECTOR);
+ // TODO: should we support nullable for vector type?
Review Comment:
Can we remove nullable for the first version?
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add vector type definition and basic APIs / Implements [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #7204:
URL: https://github.com/apache/paimon/pull/7204#issuecomment-3859076958
+1
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add vector type definition and basic APIs / Implements [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #7204:
URL: https://github.com/apache/paimon/pull/7204
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] add vector type definition and basic APIs / Implements [paimon]
Posted by "ColdL (via GitHub)" <gi...@apache.org>.
ColdL commented on code in PR #7204:
URL: https://github.com/apache/paimon/pull/7204#discussion_r2763560891
##########
paimon-api/src/main/java/org/apache/paimon/types/VectorType.java:
##########
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.paimon.types;
+
+import org.apache.paimon.annotation.Public;
+import org.apache.paimon.utils.Preconditions;
+
+import org.apache.paimon.shade.jackson2.com.fasterxml.jackson.core.JsonGenerator;
+
+import java.io.IOException;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * Data type of fixed-size vector type. The elements are densely stored.
+ *
+ * @since 2.0.0
+ */
+@Public
+public class VectorType extends DataType {
+
+ private static final long serialVersionUID = 1L;
+
+ public static final int MIN_LENGTH = 1;
+
+ public static final int MAX_LENGTH = Integer.MAX_VALUE;
+
+ public static final String FORMAT = "VECTOR<%s, %d>";
+
+ private final DataType elementType;
+
+ private final int length;
+
+ public VectorType(boolean isNullable, int length, DataType elementType) {
+ super(isNullable, DataTypeRoot.VECTOR);
+ // TODO: should we support nullable for vector type?
Review Comment:
DONE
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org