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 2020/08/14 15:10:46 UTC

[GitHub] [incubator-doris] Astralidea opened a new pull request #4354: support collate field option in compare predicate sql from datagrip

Astralidea opened a new pull request #4354:
URL: https://github.com/apache/incubator-doris/pull/4354


   ## Proposed changes
   
   Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
   
   Fix #4331  mentioned SQL:
   """
   select
   collation_name,
   character_set_name,
   is_default collate utf8_general_ci = 'Yes' as is_default
   from information_schema.collations
   """
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [] Bugfix (non-breaking change which fixes an issue)
   - [x] New feature (non-breaking change which adds functionality)
   - [] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [] Documentation Update (if none of the other choices apply)
   - [] Code refactor (Modify the code structure, format the code, etc...)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have create an issue on (Fix #ISSUE), and have described the bug/feature there in detail
   - [x] Compiling and unit tests pass locally with my changes
   - [x] I have added tests that prove my fix is effective or that my feature works
   - [] If this change need a document change, I have updated the document
   - [] Any dependent changes have been merged
   
   ## Further comments
   
   代码实现了基本的功能,可以让DataGrip读出来有哪些表和表结构了,但是感觉写得不优雅。
   试了很多方式都有冲突,也可以看看怎么改比较好一些。
   
   If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...
   


----------------------------------------------------------------
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.

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] [incubator-doris] Astralidea commented on pull request #4354: support collate field option in compare predicate sql from datagrip

Posted by GitBox <gi...@apache.org>.
Astralidea commented on pull request #4354:
URL: https://github.com/apache/incubator-doris/pull/4354#issuecomment-674555031


   > you can try above `diff`. I think it works
   
   十分感谢,好使。不过不好意思,我操作失误把原来的仓库给搞没了,我又提了个PR,在那上面看吧。
   #4365 


----------------------------------------------------------------
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.

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] [incubator-doris] Astralidea commented on pull request #4354: support collate field option in compare predicate sql from datagrip

Posted by GitBox <gi...@apache.org>.
Astralidea commented on pull request #4354:
URL: https://github.com/apache/incubator-doris/pull/4354#issuecomment-674514202


   > Looks like the `opt_collate` should be part of `expr`?
   > Not only in `select_list_item`
   
   这个我尝试放expr里过,但是会有大量的冲突,不知道应该怎么写比较好?


----------------------------------------------------------------
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.

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] [incubator-doris] Astralidea closed pull request #4354: support collate field option in compare predicate sql from datagrip

Posted by GitBox <gi...@apache.org>.
Astralidea closed pull request #4354:
URL: https://github.com/apache/incubator-doris/pull/4354


   


----------------------------------------------------------------
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.

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] [incubator-doris] morningman commented on pull request #4354: support collate field option in compare predicate sql from datagrip

Posted by GitBox <gi...@apache.org>.
morningman commented on pull request #4354:
URL: https://github.com/apache/incubator-doris/pull/4354#issuecomment-674537881


   ```
   diff --git a/fe/fe-core/src/main/cup/sql_parser.cup b/fe/fe-core/src/main/cup/sql_parser.cup
   index 4e4e028e4..34f6dbff4 100644
   --- a/fe/fe-core/src/main/cup/sql_parser.cup
   +++ b/fe/fe-core/src/main/cup/sql_parser.cup
   @@ -502,6 +502,7 @@ precedence left KW_INTERVAL;
    precedence left KW_OVER;
    precedence left KW_PARTITION;
    precedence left KW_PARTITIONS;
   +precedence left KW_COLLATE;
    precedence right KW_TEMPORARY;
    precedence right LBRACKET;
   
   @@ -3258,7 +3259,7 @@ select_sublist ::=
        ;
   
    select_list_item ::=
   -    expr:expr opt_collate:collate select_alias:alias
   +    expr:expr select_alias:alias
        {:
            RESULT = new SelectListItem(expr, alias);
        :}
   @@ -3849,7 +3850,7 @@ sign_chain_expr ::=
      ;
   
    expr ::=
   -  non_pred_expr:e
   +  non_pred_expr:e opt_collate:collate
      {: RESULT = e; :}
      | predicate:p
      {: RESULT = p; :}
   ```
   
   you can try above `diff`. I think it works


----------------------------------------------------------------
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.

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