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