beyond1920 opened a new issue, #10343: URL: https://github.com/apache/hudi/issues/10343
After apply [HUDI-6941](https://issues.apache.org/jira/browse/HUDI-6941) in the internal HUDI version(based on 0.14.0 version), there is a frequent occurrence of the execution plan selecting "broadcast hash join" to broadcast a large HUDI data source. <img width="1084" alt="image" src="https://github.com/apache/hudi/assets/1525333/80a6e1e6-393a-4719-9914-90b89b4f40d9"> I tried to investigate the cause of this issue. In those cases, using`HadoopFsRelation` to read HUDI source, and Spark `JoinSelection` would call `HadoopFsRelation#sizeInBytes` to estimate the relation size to decide whether use broadcast join or not. And `HadoopFsRelation#sizeInBytes` would call `HoodieFileIndex#sizeInBytes`. But at the moment, no partitions are loaded because using default lazy Hudi's file-index implementation's file listing mode. So `FileIndex#cachedAllInputFileSlices` is an empty map, then `HadoopFsRelation#sizeInBytes` returns 0, it caused the suboptimal join plan. Before apply [HUDI-6941](https://issues.apache.org/jira/browse/HUDI-6941), more cases could enabled lazy list mode by default, so the issue has become more frequent. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
