You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2025/07/08 06:04:17 UTC
[PR] [core] Copy max key in KeyValueDataFileWriter [paimon]
JingsongLi opened a new pull request, #5849:
URL: https://github.com/apache/paimon/pull/5849
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
We should copy the maxKey, otherwise if the reader is closed first, the maxKey inside may be reset, such as the dictionary in Parquet Reader.
<!-- 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] [core] Copy max key in KeyValueDataFileWriter [paimon]
Posted by "yuzelin (via GitHub)" <gi...@apache.org>.
yuzelin merged PR #5849:
URL: https://github.com/apache/paimon/pull/5849
--
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] [core] Copy max key in KeyValueDataFileWriter [paimon]
Posted by "leaves12138 (via GitHub)" <gi...@apache.org>.
leaves12138 commented on PR #5849:
URL: https://github.com/apache/paimon/pull/5849#issuecomment-3047498345
We can remove TODO in:

--
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] [core] Copy max key in KeyValueDataFileWriter [paimon]
Posted by "yuzelin (via GitHub)" <gi...@apache.org>.
yuzelin commented on code in PR #5849:
URL: https://github.com/apache/paimon/pull/5849#discussion_r2191605325
##########
paimon-arrow/src/main/java/org/apache/paimon/arrow/reader/ArrowBatchReader.java:
##########
@@ -93,11 +93,7 @@ public boolean hasNext() {
public InternalRow next() {
columnarRow.setRowId(position);
position++;
- // when pk merge, the last value will be referenced by maxKey. If reader
- // close, the maxKey will be useless. We must avoid this situation
- return position == rowCount
- ? internalRowSerializer.toBinaryRow(columnarRow)
Review Comment:
Remove class member `internalRowSerializer`.
##########
paimon-common/src/main/java/org/apache/paimon/data/RowHelper.java:
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.data;
+
+import org.apache.paimon.data.BinaryWriter.ValueSetter;
+import org.apache.paimon.data.InternalRow.FieldGetter;
+import org.apache.paimon.data.serializer.InternalSerializers;
+import org.apache.paimon.data.serializer.Serializer;
+import org.apache.paimon.types.DataType;
+import org.apache.paimon.types.DataTypeChecks;
+import org.apache.paimon.types.DecimalType;
+import org.apache.paimon.types.LocalZonedTimestampType;
+import org.apache.paimon.types.TimestampType;
+
+import java.io.Serializable;
+import java.util.List;
+
+/** A keeper to keep {@link BinaryRow} from {@link InternalRow}. */
+public class RowHelper implements Serializable {
Review Comment:
BinaryRowHelper/Reuser ?
--
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] [core] Copy max key in KeyValueDataFileWriter [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5849:
URL: https://github.com/apache/paimon/pull/5849#discussion_r2191695124
##########
paimon-common/src/main/java/org/apache/paimon/data/RowHelper.java:
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.data;
+
+import org.apache.paimon.data.BinaryWriter.ValueSetter;
+import org.apache.paimon.data.InternalRow.FieldGetter;
+import org.apache.paimon.data.serializer.InternalSerializers;
+import org.apache.paimon.data.serializer.Serializer;
+import org.apache.paimon.types.DataType;
+import org.apache.paimon.types.DataTypeChecks;
+import org.apache.paimon.types.DecimalType;
+import org.apache.paimon.types.LocalZonedTimestampType;
+import org.apache.paimon.types.TimestampType;
+
+import java.io.Serializable;
+import java.util.List;
+
+/** A keeper to keep {@link BinaryRow} from {@link InternalRow}. */
+public class RowHelper implements Serializable {
Review Comment:
It also provide setter and getter and serializer... So not just for `BinaryRow`.
--
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