Skip to content

Conversation

@leaves12138
Copy link
Contributor

@lxy-9602
Copy link

+1

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @leaves12138 for the contribution!

Left comments.

new DataField(
3,
"_INDEX_META",
new VarBinaryType()))))));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataTypes.BYTES

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

new DataField(5, "_EXTERNAL_PATH", newStringType(true)),
new DataField(
6,
"_GLOBAL_INDEX",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract a static field:
public static RowType GLOBAL_INDEX = XXX;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, moved to GlobalIndexMeta.SCHEMA

"Whether to write the data into fixed bucket for batch writing a postpone bucket table.");

public static final ConfigOption<Long> GLOBAL_INDEX_ROW_COUNT_PER_SHARD =
key("global-index.row_count_per_shard")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use '-' instead of '_'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

private final long fileSize;
private final long rowCount;

@Nullable private final Long rowRangeStart;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not provide these fields. Introduce a GlobalIndexMeta

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@Override
public InternalRow convertTo(IndexManifestEntry record) {
IndexFileMeta indexFile = record.indexFile();
InternalRow globalIndexRow =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This row should be nullable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, fixed

/** Path factory to create an index path. */
public interface IndexPathFactory {

Path getPath(String fileName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toPath, let this be unified to toPath(file)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

return result;
}

public List<IndexManifestEntry> scan(Filter<IndexManifestEntry> readTFilter) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please just provide scan with Snapshot. We should generate Snapshot in outside to avoid load Snapshot many times.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

/** Schema for global index. */
public class GlobalIndexMeta {

public static final RowType SCHEMA =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create a static method.

RowType schema(int startFieldId)

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@JingsongLi JingsongLi merged commit 657205a into apache:master Nov 24, 2025
28 of 30 checks passed
discivigour pushed a commit to discivigour/paimon that referenced this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants