You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/06 12:48:31 UTC

[GitHub] [doris] gavinchou opened a new pull request, #13133: [chore] Format keywords in sql_parser.cup

gavinchou opened a new pull request, #13133:
URL: https://github.com/apache/doris/pull/13133

   The key keyword definition section of `sql_parser.cup` is unordered and messy:
   1. It is almost unreadable
   2. There are no rules to format it when we make a change to it
   3. **It takes unnecessary effort to resolve conflict caused by the unordered keywords**
   
   We can apply some simple rules to format it:
   1. Sort in lexicographical order
   4. Break into several "sections", keywords in each section have the same prefix `KW_${first_letter}`
   5. Every 2 sections are connected with an empty line containing only 4 white spaces
   
   e.g.
   
   ```
   terminal String
       KW_A...
   
       KW_B...
   
       ...
   
       KW_Z...
   ```


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman merged pull request #13133: [chore] Format keywords in sql_parser.cup

Posted by GitBox <gi...@apache.org>.
morningman merged PR #13133:
URL: https://github.com/apache/doris/pull/13133


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman commented on pull request #13133: [chore] Format keywords in sql_parser.cup

Posted by GitBox <gi...@apache.org>.
morningman commented on PR #13133:
URL: https://github.com/apache/doris/pull/13133#issuecomment-1271770148

   If you do so, I suggest to make one keyword in one line. That could be more clear and easier to resolve conflict.


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] gavinchou commented on pull request #13133: [chore] Format keywords in sql_parser.cup

Posted by GitBox <gi...@apache.org>.
gavinchou commented on PR #13133:
URL: https://github.com/apache/doris/pull/13133#issuecomment-1271795821

   > If you do so, I suggest to make one keyword in one line. That could be more clear and easier to resolve conflict.
   
   @morningman Done, it's true that one-keyword-per-line is much easier to resolve conflict.


-- 
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: commits-unsubscribe@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org