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

[Bug] function copyWithLatestSchema() is not correct #4957

Open
1 of 2 tasks
dahai1996 opened this issue Jan 20, 2025 · 0 comments
Open
1 of 2 tasks

[Bug] function copyWithLatestSchema() is not correct #4957

dahai1996 opened this issue Jan 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@dahai1996
Copy link

dahai1996 commented Jan 20, 2025

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

1.0.0

Compute Engine

flink

Minimal reproduce step

no

What doesn't meet your expectations?

see :

/** TODO: this method is weird, old options will overwrite new options. */
FileStoreTable copyWithLatestSchema();

public FileStoreTable copyWithLatestSchema() {
Optional<TableSchema> optionalLatestSchema = schemaManager().latest();
if (optionalLatestSchema.isPresent()) {
Map<String, String> options = tableSchema.options();
TableSchema newTableSchema = optionalLatestSchema.get();
newTableSchema = newTableSchema.copy(options);
SchemaValidation.validateTableSchema(newTableSchema);
return copy(newTableSchema);
} else {
return this;
}
}

Map<String, String> options = tableSchema.options(); 

this line get old options,Is it because of this reason that we did not get the latest options?

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@dahai1996 dahai1996 added the bug Something isn't working label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant