JingsongLi commented on code in PR #1256:
URL: https://github.com/apache/incubator-paimon/pull/1256#discussion_r1209736977
##########
paimon-core/src/main/java/org/apache/paimon/table/AppendOnlyFileStoreTable.java:
##########
@@ -130,9 +135,23 @@ public TableWriteImpl<InternalRow> newWrite(String
commitUser) {
@Override
public TableWriteImpl<InternalRow> newWrite(
String commitUser, ManifestCacheFilter manifestFilter) {
+ AppendOnlyFileStoreWrite writer = store().newWrite(commitUser);
+ boolean negativeBucket = coreOptions().bucket() == -1;
+ if (negativeBucket) {
+ writer.skipCompaction();
+ writer.fromEmptyWriter();
+ }
return new TableWriteImpl<>(
- store().newWrite(commitUser, manifestFilter),
- new InternalRowKeyAndBucketExtractor(tableSchema),
+ writer,
+ new InternalRowKeyAndBucketExtractor(tableSchema) {
+ @Override
+ public int bucket() {
+ if (negativeBucket) {
Review Comment:
We should have a `BucketProcessor` to deal with all bucket related things
for source and sink.
You can finish this in next PR.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]