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/12/07 08:03:47 UTC

[GitHub] [doris] ByteYue opened a new pull request, #14882: [feature](information_schema)add procs table to show all functions doris supports

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

   # Proposed changes
   
   Issue Number: close #xxx
   Add one procs table similar as PostgreSQL's pg_procs internal table which can show all functions supported by the underlying database system. User would get result like the following picture once they select from Doris.
   ![image](https://user-images.githubusercontent.com/43750022/206120746-3c6ff6db-0d6b-4775-8060-4251d2fe066c.png)
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [x] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [x] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [x] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [x] No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto: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.

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] morrySnow commented on pull request #14882: [feature](information_schema)add procs table to show all functions doris supports

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

   @924060929 PTAL, Can this be easily compatible with Nereids?


-- 
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] github-actions[bot] commented on pull request #14882: [feature](information_schema)add procs table to show all functions doris supports

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14882:
URL: https://github.com/apache/doris/pull/14882#issuecomment-1340554156

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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] github-actions[bot] commented on pull request #14882: [feature](information_schema)add procs table to show all functions doris supports

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14882:
URL: https://github.com/apache/doris/pull/14882#issuecomment-1340562607

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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] ByteYue commented on pull request #14882: [feature](information_schema)add procs table to show all functions doris supports

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

   There are `show functions` command inside Doris which can show all the functions supported by Doris. This information table is redundant and will be closed.


-- 
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] 924060929 commented on pull request #14882: [feature](information_schema)add procs table to show all functions doris supports

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

   > @924060929 PTAL, Can this be easily compatible with Nereids?
   
   hello @ByteYue , Would you like to add this new feature for nereids planner?
   
   for this feature, you can add this classes
   - interface InformationSchemaRelation extends Plan
   - LogicalProcsTable: extends LogicalRelation implement InformationSchemaRelation
     - in the constructor set the qualifier name and table name to the LogicalRelation
     - provide empty constructor and the constructor provide `Optional<GroupExpression> groupExpression, LogicalProperties logicalProperties`
     - override toString, equals, hashCode, accept, withGroupExpression, withLogicalProperties like `LogicalOlapScan`
   - PhysicalProcsTable: extends PhysicalRelation implement InformationSchemaRelation
     - in the constructor set the qualifier name and table name to the LogicalRelation
     - provide constructor that provide `LogicalProperties` and another constructor provide `Optional<GroupExpression> groupExpression, LogicalProperties logicalProperties,  PhysicalProperties physicalProperties, StatsDeriveResult statsDeriveResult`
     - override toString, equals, hashCode, accept, withGroupExpression, withLogicalProperties, withPhysicalPropertiesAndStats like `PhysicalOlapScan`
   - create a `LogicalProcsTableToPhysicalProcsTable` rule like `LogicalOlapScanToPhysicalOlapScan`
   
   modify:
   - PlanVisitor: add visitor method for the LogicalProcsTable and PhysicalProcsTable
   - BindRelation: create and return LogicalProcsTable if query the information_schema.procs
   - RuleSet: add the `LogicalProcsTableToPhysicalProcsTable` to the `IMPLEMENTATION_RULES`
   - PhysicalPlanTranslator: add visitPhysicalProcsTable method to translate to the Node like OlapScanNode
   
   
   after complete this work, you can display the plan tree
   ```sql
   SET enable_vectorized_engine=true;
   SET enable_nereids_planner=true;
   SET enable_fallback_to_original_planner=false;
   explain physical plan select * from information_schema.procs;
   ``` 
   ```
   +----------------------------------------------------------------------------------------------------------------+
   | Explain String                                                                                                 |
   +----------------------------------------------------------------------------------------------------------------+
   | PhysicalDistribute ( distributionSpec=DistributionSpecGather, stats=(rows=1, width=1, penalty=0.0) )           |
   | +--PhysicalProcsTable ( ) ) |
   +----------------------------------------------------------------------------------------------------------------+
   ```
   
   


-- 
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] hello-stephen commented on pull request #14882: [feature](information_schema)add procs table to show all functions doris supports

Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #14882:
URL: https://github.com/apache/doris/pull/14882#issuecomment-1340659410

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 35.02 seconds
    load time: 436 seconds
    storage size: 17123356306 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221207093800_clickbench_pr_59264.html


-- 
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] ByteYue closed pull request #14882: [feature](information_schema)add procs table to show all functions doris supports

Posted by GitBox <gi...@apache.org>.
ByteYue closed pull request #14882: [feature](information_schema)add procs table to show all functions doris supports
URL: https://github.com/apache/doris/pull/14882


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