You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "carolinchen (Jira)" <ji...@apache.org> on 2021/10/09 07:42:00 UTC

[jira] [Created] (IMPALA-10960) Add query option for sql comment rule

carolinchen created IMPALA-10960:
------------------------------------

             Summary: Add query option for sql comment rule
                 Key: IMPALA-10960
                 URL: https://issues.apache.org/jira/browse/IMPALA-10960
             Project: IMPALA
          Issue Type: New Feature
          Components: Backend
    Affects Versions: Impala 4.0.0
            Reporter: carolinchen


SQL comment can be used to describe the SQL statements.  with comments containing information about the SQL statements,  This  may help in easily correlating slow performance with source code.

For better to use sql comment, we can set the sql comment rule with regular expression

eg: set  sql_comment_rule=/\*\s*author:\S+\s*?project:\S+\s*?desc:\S+\s*?.+\*/.+?;

this example means that if the SQL statement want be addmitted by impala,  its sql comment must include auther. project and desc's infomation. then we can trace the sql‘s origin.

there are two steps:
 # Set sql_comment_rule by own way, with set sql_comment_rule query option in regular expression
 # Check the query‘s  legality  based on the sql_comment_rule which we have set. if check succeed, SQL can be admitted to Coordinator. otherwise, will refuse the query.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org