featzhang opened a new pull request, #27583: URL: https://github.com/apache/flink/pull/27583
## What is the purpose of the change This PR implements support for viewing SQL execution history in the Flink SQL Client by adding a new `HISTORY` command. **Related JIRA**: https://issues.apache.org/jira/browse/FLINK-39069 ## Brief change log - Add `SHOW_HISTORY` command enum type in `Command.java` - Implement `HistoryCommandPrinter` class to read and display history file content - Add "HISTORY" keyword parsing in `SqlCommandParserImpl` - Pass history file path through `SqlMultiLineParser` to enable history reading - Update help message in `CliStrings` to include the new HISTORY command - Handle edge cases (empty file, file not exists, IO errors) ## Verifying this change This change can be verified manually as follows: 1. Start SQL Client: `./bin/sql-client.sh embedded` 2. Execute some SQL statements, e.g., `CREATE TABLE t1 (id INT);` 3. Run `HISTORY;` command 4. Verify that previously executed statements are displayed with line numbers 5. Test edge cases: Run HISTORY when no history file exists ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): **no** - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: **no** - The serializers: **no** - The runtime per-record code paths: **no** - Anything that affects deployment or recovery: **no** - The S3 file system connector: **no** ## Documentation - Does this pull request introduce a new feature? **yes** - If yes, how is the feature documented? **code comments and JavaDoc** - The `HISTORY` command is included in the SQL Client help message -- 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]
