bowenli86 commented on a change in pull request #8694: [FLINK-12705][hive]
Allow user to specify the Hive version in use
URL: https://github.com/apache/flink/pull/8694#discussion_r293081199
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
##########
@@ -111,20 +111,23 @@
private static final String FLINK_FUNCTION_PREFIX = "flink:";
private final HiveConf hiveConf;
+ private final String hiveVersion;
private HiveMetastoreClientWrapper client;
- public HiveCatalog(String catalogName, @Nullable String
defaultDatabase, @Nullable URL hiveSiteUrl) {
+ public HiveCatalog(String catalogName, @Nullable String
defaultDatabase, @Nullable URL hiveSiteUrl, @Nullable String hiveVersion) {
this(catalogName,
defaultDatabase == null ? DEFAULT_DB : defaultDatabase,
- createHiveConf(hiveSiteUrl));
+ createHiveConf(hiveSiteUrl),
+ hiveVersion);
}
@VisibleForTesting
- protected HiveCatalog(String catalogName, String defaultDatabase,
HiveConf hiveConf) {
+ protected HiveCatalog(String catalogName, String defaultDatabase,
HiveConf hiveConf, String hiveVersion) {
super(catalogName, defaultDatabase == null ? DEFAULT_DB :
defaultDatabase);
this.hiveConf = hiveConf == null ? createHiveConf(null) :
hiveConf;
+ this.hiveVersion = hiveVersion;
Review comment:
check not null or empty string? or assign a default version when it's null?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services