lirui-apache commented on a change in pull request #15274:
URL: https://github.com/apache/flink/pull/15274#discussion_r598104930
##########
File path:
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java
##########
@@ -217,12 +218,27 @@ private static HiveConf createHiveConf(
HadoopUtils.possibleHadoopConfPaths(
new
org.apache.flink.configuration.Configuration())) {
hadoopConf = getHadoopConfiguration(possibleHadoopConfPath);
- if (hadoopConf != null) {
+ if (hadoopConf != null && hadoopConf.size() != 0) {
Review comment:
> I think the size is 0 when none of conf files exist, which should be
correct.
No, we don't get such guarantees from the `size()` API contract so it's not
safe to rely on it. We can modify `getHadoopConfiguration` to explicitly return
null when the conf files don't exist.
--
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]