Fang-Yu Rao has posted comments on this change. ( http://gerrit.cloudera.org:8080/20669 )
Change subject: IMPALA-3268: Add support for SHOW VIEWS statement ...................................................................... Patch Set 8: (4 comments) Hi all, in the patch set 8 I have addressed most of Michael's and Quanlong's comments. Let me know if there are additional suggestions. Thanks very much for the help! http://gerrit.cloudera.org:8080/#/c/20669/6//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/20669/6//COMMIT_MSG@14 PS6, Line 14: always load the table type of each Tab > I think what matters is whether the table type of the views are loaded. The Thanks Quanlong! Let me revise the commit message and add 2 end-to-end tests to exercise the code path related to the flag '--load_catalog_in_background=true' in the next patch. http://gerrit.cloudera.org:8080/#/c/20669/5/be/src/service/client-request-state.cc File be/src/service/client-request-state.cc: http://gerrit.cloudera.org:8080/#/c/20669/5/be/src/service/client-request-state.cc@366 PS5, Line 366: const std::set<TImpalaTableType::type>& table_types = params->table_types; > nit: I'd probably do Thanks Michael! I will change the type of 'table_types' of the function GetTableNames() to a reference (instead of a pointer) to set<TImpalaTableType::type> based on your suggestion at https://gerrit.cloudera.org/c/20669/7/be/src/service/frontend.cc#210 and will change https://gerrit.cloudera.org/c/20669/5/be/src/service/client-request-state.cc#368 in the following accordingly. http://gerrit.cloudera.org:8080/#/c/20669/7/be/src/service/frontend.h File be/src/service/frontend.h: http://gerrit.cloudera.org:8080/#/c/20669/7/be/src/service/frontend.h@65 PS7, Line 65: Status GetTableNames(const std::string& db, const std::string* pattern, > I'm not really sure why this was split out as a separate function signature Thanks Michael! I split this function out also because this function is used at https://github.com/apache/impala/blob/master/be/src/service/impala-http-handler.cc#L930-L931. Do we want to make the change to the call site so that the call site will provide an empty set as 'table_types' when calling GetTableNames()? http://gerrit.cloudera.org:8080/#/c/20669/7/be/src/service/frontend.cc File be/src/service/frontend.cc: http://gerrit.cloudera.org:8080/#/c/20669/7/be/src/service/frontend.cc@210 PS7, Line 210: params.__set_table_types(table_types); > If table_types is null, this crashes. We should take table_types as a ref r Thanks Michael! You are correct. It's dangerous to not perform the null pointer check before dereferencing a pointer. I will change the type of the argument 'table_types' to a reference in the next patch. -- To view, visit http://gerrit.cloudera.org:8080/20669 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I321fc5350392a815949a4e7d2a64d60466689788 Gerrit-Change-Number: 20669 Gerrit-PatchSet: 8 Gerrit-Owner: Fang-Yu Rao <fangyu....@cloudera.com> Gerrit-Reviewer: Aman Sinha <amsi...@cloudera.com> Gerrit-Reviewer: Fang-Yu Rao <fangyu....@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Michael Smith <michael.sm...@cloudera.com> Gerrit-Reviewer: Quanlong Huang <huangquanl...@gmail.com> Gerrit-Reviewer: Sai Hemanth Gantasala <saihema...@cloudera.com> Gerrit-Comment-Date: Tue, 28 Nov 2023 23:15:19 +0000 Gerrit-HasComments: Yes