BePPPower opened a new pull request, #14213: URL: https://github.com/apache/doris/pull/14213
# Proposed changes Issue Number: close #13959 This pr does two things: 1. support `hdfs()` table valued function. 2. add regression test ## Problem summary Just like S3() table valued function, we can use `hdfs()` tvf to read file in hdfs. Like this: ``` MySQL [(none)]> select * from hdfs("uri" = "hdfs://127.0.0.1:842/user/doris/csv_format_test/student.csv", "fs.defaultFS" = "hdfs://127.0.0.1:8424", "hadoop.username" = "xx", "format" = "csv"); +------+---------+------+ | c1 | c2 | c3 | +------+---------+------+ | 1 | alice | 18 | | 2 | bob | 20 | | 3 | jack | 24 | | 4 | jackson | 19 | | 5 | liming | 18 | | 6 | luffy | 20 | | 7 | zoro | 22 | | 8 | sanzi | 26 | | 9 | wusuopu | 21 | | 10 | nami | 18 | +------+---------+------+ // Also support desc function hdfs() MySQL [(none)]> desc function hdfs("uri" = "hdfs://127.0.0.1:8424/user/doris/csv_format_test/student_with_names.csv", "fs.defaultFS" = "hdfs://127.0.0.1:8424", "hadoop.username" = "xx", "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 | +-------+------+------+-------+---------+-------+ ``` And `hdfs()` is also support `csv/csv_with_names/csv_with_names_and_types/json/parquet/orc` file format. ## Checklist(Required) 1. Does it affect the original behavior: - [x] Yes - [ ] No - [ ] I don't know 3. Has unit tests been added: - [ ] Yes - [x] No - [ ] No Need 4. Has document been added or modified: - [ ] Yes - [x] No - [ ] No Need 5. Does it need to update dependencies: - [ ] Yes - [x] No 6. 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