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/11/07 13:54:40 UTC

[GitHub] [doris] BePPPower opened a new pull request, #14047: [feature](table-valued-function) Support `desc from s3()` and modify the syntax of tvf

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

   # Proposed changes
   
   Issue Number: close #10217
   
   This pr does two things:
   1. Support `desc from s3()`
   2. modify the syntax of tvf
   
   ## Problem summary
   
   1. Support `desc from s3()`
   Use `desc from s3()` to get table schema of S3 table valued function. It likes:
   ```
   MySQL [(none)]> desc from s3("S3_URI" = "http://127.0.0.1:9312/test2/student_with_names.csv","AWS_ACCESS_KEY"= "minioadmin", "AWS_SECRET_KEY" = "minioadmin", "FORMAT" = "csv_with_names");
   +-------+------+------+-------+---------+-------+
   | Field | Type | Null | Key   | Default | Extra |
   +-------+------+------+-------+---------+-------+
   | id    | TEXT | Yes  | false | NULL    | NONE  |
   | name  | TEXT | Yes  | false | NULL    | NONE  |
   | age   | TEXT | Yes  | false | NULL    | NONE  |
   +-------+------+------+-------+---------+-------+
   3 rows in set (0.32 sec)
   ```
   2. modify the syntax of tvf
   In the old syntax, the params of tvf is fixed order and is not flexible enough for S3 tvf. So, We change the syntax of table valued function. 
   
   For numbers tvf:
   ```
   // old syntax:
   numbers("n", "m")
   
   // new syntax:
   numbers(
     "number" = "n",
     "backend_num" = "m"
     );
   ```
   For S3 tvf:
   ```
   // old syntax:
   s3("http://127.0.0.1:9312/test2/student_with_names.csv", "minioadmin",  "minioadmin", "csv_with_names");
   
   // new syntax:
   s3(
   "S3_URI" = "http://127.0.0.1:9312/test2/student_with_names.csv",
   "AWS_ACCESS_KEY"= "minioadmin", 
   "AWS_SECRET_KEY" = "minioadmin", 
   "FORMAT" = "csv_with_names"
   );
   ```
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [x] Yes
       - [ ] No
       - [ ] I don't know
   4. Has unit tests been added:
       - [ ] Yes
       - [x] No
       - [ ] No Need
   5. Has document been added or modified:
       - [x] Yes
       - [ ] No
       - [ ] No Need
   6. Does it need to update dependencies:
       - [ ] Yes
       - [x] No
   7. 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] hello-stephen commented on pull request #14047: [feature](table-valued-function) Support `desc from s3()` and modify the syntax of tvf

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

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 34.19 seconds
    load time: 458 seconds
    storage size: 17180198768 Bytes
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221107190050_clickbench_pr_41419.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] BePPPower commented on a diff in pull request #14047: [feature](table-valued-function) Support `desc from s3()` and modify the syntax of tvf

Posted by GitBox <gi...@apache.org>.
BePPPower commented on code in PR #14047:
URL: https://github.com/apache/doris/pull/14047#discussion_r1016201659


##########
fe/fe-core/src/main/cup/sql_parser.cup:
##########
@@ -3813,6 +3813,10 @@ describe_stmt ::=
     {:
         RESULT = new DescribeStmt(table, false);
     :}
+    | describe_command KW_FROM table_valued_function_ref:tvf

Review Comment:
   ok



-- 
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 #14047: [feature](table-valued-function) Support `desc from s3()` and modify the syntax of tvf

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

   PR approved by anyone and no changes requested.


-- 
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 a diff in pull request #14047: [feature](table-valued-function) Support `desc from s3()` and modify the syntax of tvf

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #14047:
URL: https://github.com/apache/doris/pull/14047#discussion_r1016088273


##########
fe/fe-core/src/main/cup/sql_parser.cup:
##########
@@ -3813,6 +3813,10 @@ describe_stmt ::=
     {:
         RESULT = new DescribeStmt(table, false);
     :}
+    | describe_command KW_FROM table_valued_function_ref:tvf

Review Comment:
   how about `describe function xxx`?



-- 
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 #14047: [feature](table-valued-function) Support `desc from s3()` and modify the syntax of tvf

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

   PR approved by at least one committer and no changes requested.


-- 
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] yiguolei merged pull request #14047: [feature](table-valued-function) Support `desc from s3()` and modify the syntax of tvf

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


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