-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Hive] Cache TableSchema into Configuration to avoid loading read scheme file in PaimonSerDe #2946
Conversation
5207f0a
to
a160915
Compare
@@ -192,7 +198,16 @@ public static HiveSchema extract(@Nullable Configuration configuration, Properti | |||
return new HiveSchema(builder.build()); | |||
} | |||
|
|||
private static Optional<TableSchema> getExistingSchema( | |||
@VisibleForTesting | |||
static Optional<TableSchema> getTableSchemaFromCache(Properties properties) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just cache HiveSchema
?
@@ -192,7 +198,16 @@ public static HiveSchema extract(@Nullable Configuration configuration, Properti | |||
return new HiveSchema(builder.build()); | |||
} | |||
|
|||
private static Optional<TableSchema> getExistingSchema( | |||
@VisibleForTesting | |||
static Optional<TableSchema> getTableSchemaFromCache(Properties properties) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getSchemaFromProperties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
…eme file in PaimonSerDe (apache#2946)
Purpose
The Map Task will fetch the tableschema of paimon. we cache the schema json to configuration to reduce the access of FileSystem
Linked issue: close #xxx
Tests
API and Format
Documentation