4paradigm / 4paradigm/OpenMLDB
`select into` may fail if `HADOOP_CONF_DIR` or `YARN_CONF_DIR` env are accidentally configured
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 331
- Avg merge
- 12d 12h
- Merged PRs (30d)
- 1
Description
**Bug Description**
`select into outfile '/tmp/out.csv'` may fail if the `HADOOP_CONF_DIR` or `YARN_CONF_DIR` environmental variables are accidentally configured and its `defaultfs` is `hdfs`.
**Expected Behavior**
For `outfile '/tmp/out.csv'`, users expect to write into local filesystems.
Possible solutions may be:
- add Q&A to show the potential issue
- guide users to specify 'file:///tmp/out.csv' to avoid the confusion
**Steps to Reproduce**
1.
2.
3.
4.
Contributor guide
Research direction
Look at the code that handles 'select into outfile' parsing and path resolution, likely in the SQL engine or filesystem abstraction layer. Check how environment variables like HADOOP_CONF_DIR and YARN_CONF_DIR are read and how they affect the default filesystem. The fix may involve ensuring local file paths are not misinterpreted as HDFS, or improving error messages. Test by setting these environment variables and running a simple select into outfile command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- hadoop
- Domain
- backend, cli, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100