dariocurr opened a new issue, #23796:
URL: https://github.com/apache/datafusion/issues/23796

   ## Describe the bug
   
   `datafusion-cli`'s interactive REPL hardcodes its rustyline history file as
   the relative path `.history` (see `exec_from_repl` in
   
[`datafusion-cli/src/exec.rs`](https://github.com/apache/datafusion/blob/main/datafusion-cli/src/exec.rs)):
   
   ```rust
   rl.load_history(".history").ok();
   ...
   rl.save_history(".history")
   ```
   
   Because the path is relative, the history file is created in whatever
   directory the CLI happens to be launched from, so every working directory
   silently accumulates its own hidden `.history` file, and there is no way to
   point it somewhere else (e.g. a fixed location shared across sessions, or a
   location outside the current directory when it's read-only).
   
   ## To Reproduce
   
   Run `datafusion-cli` from two different directories and note that each gets
   its own independent `.history` file, with no way to override the location.
   
   ## Expected behavior
   
   Allow the history file location to be configured, e.g. via a `--history-file`
   CLI flag (and/or an environment variable), while keeping the current
   `.history` relative-path behavior as the default so existing workflows are
   unaffected.
   
   ## Additional context
   
   I have a small PR ready that adds a `--history-file <PATH>` flag and a
   `DATAFUSION_HISTORY_FILE` environment variable (flag takes precedence),
   without changing the existing default.


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

Reply via email to