PakhomovAlexander opened a new pull request, #7572:
URL: https://github.com/apache/ignite-3/pull/7572

   ## Summary
   
   Fixes https://issues.apache.org/jira/browse/IGNITE-24602
   
   When running `sql -v "select 1;"` in the CLI, no verbose diagnostic output 
was shown. Two issues were causing this:
   
   1. **Verbose flag not forwarded**: `SqlCommand` and `SqlReplCommand` 
delegate execution to `SqlExecCommand`/`SqlExecReplCommand` via `buildArgs()`, 
but the `-v` flag was silently dropped during argument forwarding.
   2. **No SQL-specific verbose output**: The verbose infrastructure only 
logged HTTP/REST traffic. `SqlManager` had no JDBC/SQL-level logging.
   
   ### Changes
   - **`CliLoggers`**: Added `getVerboseLevel()` and `verboseLog(minLevel, 
message)` for level-aware verbose output
   - **`SqlManager`**: Added JDBC/SQL verbose logging following the `-->` / 
`<--` convention:
     - `-v`: JDBC URL, SQL query, result summary (row count + duration)
     - `-vv`: + column metadata (names and types)
     - `-vvv`: + JDBC driver name and version
   - **`SqlCommand`/`SqlReplCommand`**: Fixed `buildArgs()` to forward verbose 
flags to delegate commands
   - **`ItSqlVerbosityTest`**: Integration test covering all verbosity levels
   
   ### Example output
   
   `-v`:
   ```
   --> JDBC jdbc:ignite:thin://localhost:10800
   --> SQL select 1
   <-- 1 row(s) (5ms)
   ```
   
   `-vvv`:
   ```
   --> JDBC jdbc:ignite:thin://localhost:10800
   --> Driver: Apache Ignite Thin JDBC Driver 3.0.0
   --> SQL select 1
   <-- Columns: EXPR$0 (INTEGER)
   <-- 1 row(s) (5ms)
   ```
   
   ## Test plan
   - [x] Unit tests pass: `./gradlew :ignite-cli:test`
   - [x] Checkstyle/PMD pass: `./gradlew :ignite-cli:checkstyleMain 
:ignite-cli:pmdMain`
   - [ ] New integration test `ItSqlVerbosityTest` — tests all verbosity levels 
with SQL
   - [ ] Existing `ItVerbosityTest` (HTTP verbose) should still pass


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

Reply via email to