Jason Fehr has posted comments on this change. ( http://gerrit.cloudera.org:8080/23777 )
Change subject: IMPALA-14370: OpenTelemetry Query Tracing Skips Queries with Leading Comments ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/23777/2//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23777/2//COMMIT_MSG@16 PS2, Line 16: Replaces the parser with a more robust parser that properly handles > Is syntax parsing so expensive we need to reimplement it for this case? There are a few different options for solving this problem each with significant drawbacks. I had looked into a few different ideas for getting rid of this custom text parser, but I didn't look at moving just the SQL parsing up in the query lifecycle. I found that it's going to be a fair bit of work since CUP only supports Java thus necessitating extra be->fe JNI calls. The main concern is that OTel trace spans need to be created as soon as possible when Impala receives a query so there is visibility into both running and not yet running queries. However, query type determination doesn't happen until Planning. This does beg the question of whether or not the OTel trace can be starting during planning after SQL parsing but before the heavy operations that can cause planning to take awhile. I'll look into that solution. > I've also forgotten why we skip tracing some queries. Not all query types are supported for OTel tracing due to the large amount of work to add specific span starts/ends in proper places throughout the query lifecycle code and test all edge cases. Not all query types need to be traced (for example, refresh functions). However, this also begs the question if the OTel trace should be ended early if the query type cannot be traced instead of the current solution which avoids creating a trace altogether. I'll look into this possibility as well. -- To view, visit http://gerrit.cloudera.org:8080/23777 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I1425b32006f81586bf75c2e4045d23bab91e1611 Gerrit-Change-Number: 23777 Gerrit-PatchSet: 2 Gerrit-Owner: Jason Fehr <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Surya Hebbar <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]> Gerrit-Comment-Date: Wed, 17 Dec 2025 23:41:06 +0000 Gerrit-HasComments: Yes
