SaintBacchus opened a new issue, #10723: URL: https://github.com/apache/doris/issues/10723
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version master branch ### What's Wrong? When create some presto view in a hive datasource and then use doris hms table to show the tables, I will get these error ``` 2022-07-09 16:46:24,893 WARN (doris-mysql-nio-pool-2|261) [ReadListener.lambda$handleEvent$0():60] Exception happened in one session([remote ip: 10.248.181.219]). java.lang.NullPointerException: null at org.apache.doris.catalog.external.HMSExternalTable.init(HMSExternalTable.java:90) ~[doris-fe.jar:1.0-SNAPSHOT] at org.apache.doris.catalog.external.HMSExternalTable.makeSureInitialized(HMSExternalTable.java:72) ~[doris-fe.jar:1.0-SNAPSHOT] at org.apache.doris.catalog.external.HMSExternalTable.getFullSchema(HMSExternalTable.java:147) ~[doris-fe.jar:1.0-SNAPSHOT] at org.apache.doris.catalog.external.HMSExternalTable.getBaseSchema(HMSExternalTable.java:153) ~[doris-fe.jar:1.0-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.handleFieldList(ConnectProcessor.java:324) ~[doris-fe.jar:1.0-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.dispatch(ConnectProcessor.java:369) ~[doris-fe.jar:1.0-SNAPSHOT] at org.apache.doris.qe.ConnectProcessor.processOnce(ConnectProcessor.java:555) ~[doris-fe.jar:1.0-SNAPSHOT] at org.apache.doris.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:52) ~[doris-fe.jar:1.0-SNAPSHOT] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?] at java.lang.Thread.run(Thread.java:834) ~[?:?] ``` The code [remoteTable.getSd().getInputFormat()](https://github.com/apache/doris/blob/7f9eeb8fc31550e2406251fd9d5ba57bfad89fb5/fe/fe-core/src/main/java/org/apache/doris/catalog/external/HMSExternalTable.java#L90) will be null when the hms table is a view. ### What You Expected? the current datasource will be the dest hive database. ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
