flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] lirui-apache commented on a change in pull request #9988: [FLINK-14418][hive] Create HiveModule to provide Hive built-in functions
Date Thu, 31 Oct 2019 03:12:08 GMT
lirui-apache commented on a change in pull request #9988: [FLINK-14418][hive] Create HiveModule
to provide Hive built-in functions
URL: https://github.com/apache/flink/pull/9988#discussion_r340941385
 
 

 ##########
 File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/functions/hive/HiveFunctionDefinitionFactory.java
 ##########
 @@ -57,14 +49,11 @@
 public class HiveFunctionDefinitionFactory implements FunctionDefinitionFactory {
 	private static final Logger LOG = LoggerFactory.getLogger(HiveTableFactory.class);
 
-	private final String hiveVersion;
 	private final HiveShim hiveShim;
 
-	public HiveFunctionDefinitionFactory(HiveConf hiveConf) {
-		// this has to come from hiveConf, otherwise we may lose what user specifies in the yaml
file
-		this.hiveVersion = checkNotNull(hiveConf.get(HiveCatalogValidator.CATALOG_HIVE_VERSION),
-			"Hive version is not defined");
-		this.hiveShim = HiveShimLoader.loadHiveShim(hiveVersion);
+	public HiveFunctionDefinitionFactory(HiveShim hiveShim) {
+		checkNotNull(hiveShim, "hiveShim cannot be null or empty string");
 
 Review comment:
   guess the message should just be "hiveShim cannot be 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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message