Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/12635 )
Change subject: IMPALA-8254: Fix error when running compute stats with compression_codec set ...................................................................... Patch Set 7: (4 comments) http://gerrit.cloudera.org:8080/#/c/12635/3/be/src/service/query-options.cc File be/src/service/query-options.cc: http://gerrit.cloudera.org:8080/#/c/12635/3/be/src/service/query-options.cc@235 PS3, Line 235: break; > I created some macros to simplify a lot of things. Please take a look at it Thanks! It looks much less noisy to me. http://gerrit.cloudera.org:8080/#/c/12635/7/be/src/service/query-options.cc File be/src/service/query-options.cc: http://gerrit.cloudera.org:8080/#/c/12635/7/be/src/service/query-options.cc@175 PS7, Line 175: #define BUILD_QUERY_OPT_FN(ENUM) \ : static bool get##ENUM(const string& value, ENUM::type* enum_value) { \ Most of this could be expressed with a template function that gets the enum type as parameter, and the map as an argument. It wouldn't make things simpler, but template functions are probably less scary than macros. http://gerrit.cloudera.org:8080/#/c/12635/7/be/src/service/query-options.cc@178 PS7, Line 178: value == e.second The original comparison was case insensitive, which is expected for query options. http://gerrit.cloudera.org:8080/#/c/12635/7/be/src/service/query-options.cc@186 PS7, Line 186: GET_QUERY_OPT I would prefer to mention "thrift" and "enum" in the name. -- To view, visit http://gerrit.cloudera.org:8080/12635 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I2cb546fbd3d2a02e0ed30d85a33a04852bed9dd2 Gerrit-Change-Number: 12635 Gerrit-PatchSet: 7 Gerrit-Owner: Fredy Wijaya <fwij...@cloudera.com> Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com> Gerrit-Reviewer: Fredy Wijaya <fwij...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Thu, 28 Feb 2019 22:23:54 +0000 Gerrit-HasComments: Yes