[ 
https://issues.apache.org/jira/browse/IGNITE-27514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr updated IGNITE-27514:
-------------------------------
    Description: 
Implement pager integration for CLI REPL mode to handle large outputs (SQL 
results, execution plans, config dumps).

_Problem:_
Large outputs scroll past without control, making it impossible to review 
execution plans, large query results, or configuration dumps.

_Solution:_
Pipe outputs exceeding terminal height through a pager (less, more, or user's 
$PAGER).

_New config keys:_
* ignite.cli.pager.enabled (boolean, default: true)
* ignite.cli.pager.command (string, default: "less -RFX")

_Platform support:_
* Linux/macOS: less -RFX (default)
* Windows: more (fallback)
* Respect $PAGER environment variable

_Requirements:_
* Must work in Docker containers (detect if pager available)
* REPL mode only for initial implementation

  was:
Implement pager integration for CLI REPL mode to handle large outputs (SQL 
results, execution plans, config dumps).

_Problem:_
Large outputs scroll past without control, making it impossible to review 
execution plans, large query results, or configuration dumps.

_Solution:_
Pipe outputs exceeding terminal height through a pager (less, more, or user's 
$PAGER).

_Implementation approach:_
* Use CommandLineContextProvider.setPrintWrapper() to intercept output
* Capture output to StringWriter, compare line count vs terminal.getHeight()
* If exceeds threshold, spawn pager process and pipe output
* Fallback to direct print if pager unavailable

_New config keys:_
* ignite.cli.pager.enabled (boolean, default: true)
* ignite.cli.pager.command (string, default: "less -RFX")

_Platform support:_
* Linux/macOS: less -RFX (default)
* Windows: more (fallback)
* Respect $PAGER environment variable

_Key files:_
* CliConfigKeys.java - config keys
* PagerSupport.java (new) - pager utility
* ReplExecutorImpl.java - print wrapper setup
* AbstractCallExecutionPipeline.java - route output through wrapper

_Requirements:_
* Must work in Docker containers (detect if pager available)
* REPL mode only for initial implementation


> CLI: Integrate pager for large output handling in REPL
> ------------------------------------------------------
>
>                 Key: IGNITE-27514
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27514
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Aleksandr
>            Priority: Major
>              Labels: ignite-3
>
> Implement pager integration for CLI REPL mode to handle large outputs (SQL 
> results, execution plans, config dumps).
> _Problem:_
> Large outputs scroll past without control, making it impossible to review 
> execution plans, large query results, or configuration dumps.
> _Solution:_
> Pipe outputs exceeding terminal height through a pager (less, more, or user's 
> $PAGER).
> _New config keys:_
> * ignite.cli.pager.enabled (boolean, default: true)
> * ignite.cli.pager.command (string, default: "less -RFX")
> _Platform support:_
> * Linux/macOS: less -RFX (default)
> * Windows: more (fallback)
> * Respect $PAGER environment variable
> _Requirements:_
> * Must work in Docker containers (detect if pager available)
> * REPL mode only for initial implementation



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to