diff --git a/be/src/connector/hive_connector.cpp b/be/src/connector/hive_connector.cpp index 8f62e8a63f10d..23d9461ce8ffc 100644 --- a/be/src/connector/hive_connector.cpp +++ b/be/src/connector/hive_connector.cpp @@ -559,7 +559,9 @@ Status HiveDataSource::_init_scanner(RuntimeState* state) { native_file_path = file_path.native(); } if (native_file_path.empty()) { - native_file_path = _hive_table->get_base_path() + scan_range.relative_path; + bool start_with_slash = !scan_range.relative_path.empty() && scan_range.relative_path.at(0) == '/'; + native_file_path = _hive_table->get_base_path() + + (start_with_slash ? scan_range.relative_path : "/" + scan_range.relative_path); } const auto& hdfs_scan_node = _provider->_hdfs_scan_node;