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

   # Proposed changes
   
   Issue Number: close #10217
   pr Number: close #10214
   
   This pr does three things:
   
   1. Modified the framework of table-valued-function(tvf).
   2. be support `fetch_table_schema` rpc.
   3. Implemented `S3(path, AK, SK, format)` table-valued-function.
   
   ## Problem summary
   
   1. Modified the framework of table-valued-function(tvf).
   Each implementation of tvf requires a new `scan node` in the old framework 
of pr #10214 . Actually, different `scan nodes` should correspond to different 
data sources. I modified the tvf framework so that it can generate different 
`scan node` according to data source of this tvf.
   For example, the data of `numbers(n,m)` tvf is derived from memory, so it 
generate `DataGenScanNode`. And the data of `s3(...)` tvf is derived from S3 
Storage, so it generate `ExternalFileScanNode`.
   
   2. be support `fetch_table_schema` rpc.
   There is no table schema in `s3()` advance, so we need `fetch_table_schema` 
rpc to parse table schema from file in S3 Storage.
   
   3. `S3(path, AK, SK, format)`
   The initial implement of `s3(..)` tvf, use like:
   ```
   MySQL [(none)]> select * from s3("http://127.0.0.1:9312/test2/student1.csv";, 
"minioadmin", "minioadmin", "csv");
   +------+------+------+
   | c1   | c2   | c3   |
   +------+------+------+
   | 1    | ftw  | 12   |
   | 2    | zs   | 18   |
   | 3    | ww   | 20   |
   +------+------+------+
   3 rows in set (0.04 sec)
   
   MySQL [(none)]> select * from 
s3("http://127.0.0.1:9312/test2/student_with_names.csv";, "minioadmin", 
"minioadmin", "csv_with_names");
   +------+------+------+
   | id   | name | age  |
   +------+------+------+
   | 1    | ftw  | 12   |
   | 2    | zs   | 18   |
   | 3    | ww   | 20   |
   +------+------+------+
   3 rows in set (0.04 sec)
   
   ```
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [x] Yes
       - [ ] No
       - [ ] I don't know
   5. Has unit tests been added:
       - [ ] Yes
       - [x] No
       - [ ] No Need
   6. Has document been added or modified:
       - [ ] Yes
       - [x] No
       - [ ] No Need
   7. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   8. 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 
[d...@doris.apache.org](mailto:d...@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-unsubscr...@doris.apache.org

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


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

Reply via email to