bigcyy commented on PR #3410:
URL: https://github.com/apache/hertzbeat/pull/3410#issuecomment-2921240431

   > hi,I have two questions:
   > 1.If use the local grammar file parse sql, maybe unable to use some 
advanced queries or dialects.
   > 2.I noticed you modified the cache logic,is there any consideration here
   
   Hi, here are my responses to your questions:
   
   1. Regarding SQL parsing:
   You're absolutely right — using a local grammar file may not support certain 
advanced queries or database-specific dialects. That’s why I’ve decided to 
retain both sql("") and promql("") styles, to ensure full compatibility with 
different SQL engines and PromQL syntax.
   
   2. About the cache logic modification:
   Previously, if I needed to access the tokens (to extract the original 
SQL/PromQL string), I had to retrieve them from the cache again, which was 
redundant. So I refactored the code: now it first obtains the tokens, then 
generates the parse tree. This improves clarity and avoids repeated cache 
lookups.
   
   Let me know if you have any suggestions or concerns.


-- 
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: notifications-unsubscr...@hertzbeat.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org
For additional commands, e-mail: notifications-h...@hertzbeat.apache.org

Reply via email to