Quanlong Huang has posted comments on this change. ( http://gerrit.cloudera.org:8080/22264 )
Change subject: IMPALA-13305: Better thrift compatibility checks based on pyparsing ...................................................................... Patch Set 9: (2 comments) http://gerrit.cloudera.org:8080/#/c/22264/9/bin/jenkins/critique-gerrit-review.py File bin/jenkins/critique-gerrit-review.py: http://gerrit.cloudera.org:8080/#/c/22264/9/bin/jenkins/critique-gerrit-review.py@270 PS9, Line 270: print(f"Removed struct {struct_name}") > Should this get a warning? I guess if it was unused elsewhere, it's not an I think it's ok if it's only used in an optional field and that field is also removed. If it's used in a required field, the following code will report a warning of "Deleting required field..." It could also be used in a method definition. But currently all the methods of CatalogService are in the same form of single parameter and single response: service CatalogService { TDdlExecResponse ExecDdl(1: TDdlExecRequest req); TGetCatalogObjectResponse GetCatalogObject(1: TGetCatalogObjectRequest req); TGetPartitionStatsResponse GetPartitionStats(1: TGetPartitionStatsRequest req); TResetMetadataResponse ResetMetadata(1: TResetMetadataRequest req); TUpdateCatalogResponse UpdateCatalog(1: TUpdateCatalogRequest req); TGetFunctionsResponse GetFunctions(1: TGetFunctionsRequest req); TPrioritizeLoadResponse PrioritizeLoad(1: TPrioritizeLoadRequest req); TGetPartialCatalogObjectResponse GetPartialCatalogObject( 1: TGetPartialCatalogObjectRequest req); TUpdateTableUsageResponse UpdateTableUsage(1: TUpdateTableUsageRequest req); TGetNullPartitionNameResponse GetNullPartitionName(1: TGetNullPartitionNameRequest req); TGetLatestCompactionsResponse GetLatestCompactions(1: TGetLatestCompactionsRequest req); } We usually change the definition of T*Request or T*Response, but not the method definitions. So I think we are still safe. But in the long term, we do need to compare the method definitions as well. As this patch is to resolve the false positive warnings, I hope we can keep it simple and do that in a seperate patch. http://gerrit.cloudera.org:8080/#/c/22264/9/bin/jenkins/thrift_parser.py File bin/jenkins/thrift_parser.py: http://gerrit.cloudera.org:8080/#/c/22264/9/bin/jenkins/thrift_parser.py@22 PS9, Line 22: # TODO: Consider using thriftpy2.parser. Need it to expose lineno. > Why didn't you use it? Too many other dependencies? Also seems like you fig thriftpy2.parser doesn't provide lineno: https://github.com/Thriftpy/thriftpy2/issues/298 We need to either hack it to expose lineno or try other tools. -- To view, visit http://gerrit.cloudera.org:8080/22264 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia1dc4112404d0e7c5df94ee9f59a4fe2084b360d Gerrit-Change-Number: 22264 Gerrit-PatchSet: 9 Gerrit-Owner: Quanlong Huang <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Comment-Date: Sat, 04 Jan 2025 00:23:34 +0000 Gerrit-HasComments: Yes
