BePPPower opened a new pull request, #10214:
URL: https://github.com/apache/incubator-doris/pull/10214

   # Proposed changes
   
   A table-valued function (TVF) is a function that returns a relation or a set 
of rows. There are two types of TVFs :
   1. a TVF that can be specified in a FROM clause, e.g. range;
   2. a TVF that can be specified in SELECT/LATERAL VIEW clauses, e.g. explode.
   
   Here implements the first table valued function framework in this PR. The 
frameworks is as follows:
   - add TableValuedFunctionRef as a table ref in SQL definition.
   - TableValuedFunctionRef will be parsed and analyzed during analysis 
process, it will bind to the related TableValuedFunctionInf according to 
function name.
   - A table valued function will generate a dynamic table and scannode during 
plan stage. So that a TableValuedFunctionInf mainly defined two interface:
   - public abstract List getTableColumns()
   - public abstract List<TableValuedFunctionTask> getTasks();
   
   Developer should also implement the related ScanNode on BE.
   
   ## Problem Summary:
   
   In this PR, there is a demo table function numbers. User could use select 
sum(number) from numbers("10000"). And we could use this table function to test 
our vector engines performance.
   
   MySQL [(none)]> select sum(number) from (select number from numbers("1000") 
where number < 10) as c;
   +---------------+
   | sum(number) |
   +---------------+
   | 45 |
   +---------------+
   1 row in set (0.01 sec)
   
   Numbers table function is only supported under vectoried engine.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[[email protected]](mailto:[email protected]) 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to