The GitHub Actions job "CI" on fluss.git/feature/fluss-cli-with-tests has failed. Run started by GitHub user gnuhpc (triggered by polyzos).
Head commit for run: 45c48f821edb09726e5e26d17a553e13f2fda96b / gnuhpc <[email protected]> feat(cli): add Fluss CLI module with comprehensive test coverage Core Features: - Interactive SQL REPL shell for Fluss clusters - Command-line SQL execution with -e and -f options - ASCII table formatting for query results - Complex type support (ARRAY, MAP, ROW) - Connection configuration management - Warning suppression for clean output (FLUSS_CLI_SUPPRESS_WARNINGS) Test Coverage: - 114 unit tests covering all core functionality - Integration test script (fluss-cli-release-check.sh) with 35 test cases - All tests passing with 0 failures - Checkstyle: 0 violations - Apache RAT: all files licensed Integration: - Add fluss-cli module to root pom.xml - Package CLI JAR in fluss-dist distribution - Add CLI documentation to website feat(cli): refactor CLI with AST-based parsing and client-side WHERE filtering Major Refactoring: - Migrated from regex-based SQL parsing to Apache Calcite AST nodes - Created comprehensive AST node hierarchy (~1,430 lines) - Refactored 24 executor methods across 6 executors - Added structured exception hierarchy for better error handling WHERE Clause Filtering: - Implemented client-side WHERE filtering for Log table scans - Support all comparison operators: =, <>, >, <, >=, <= - Support logical operators: AND, OR with nested conditions - Smart column fetching: columnsToFetch = SELECT cols ∪ WHERE cols - Server-side projection optimization + client-side filtering - Post-filter projection to final SELECT columns Architecture: - Log tables: Server projection + client WHERE filtering - KV tables: Primary key lookup only (Lookup API, unchanged) Example Flow: SELECT name FROM events WHERE age > 25 AND status = 'active' 1. Extract WHERE columns: [age, status] 2. Calculate fetch: [name, age, status] 3. Server projection: fetch these 3 columns only 4. Client filter: age > 25 AND status = 'active' 5. Client project: [name] 6. Display: name column only Components: - FlussStatement: Base AST node for all SQL statements - FlussStatementParser: AST-based statement router - WhereClauseEvaluator: Predicate evaluation + column extraction - QueryExecutor: Smart projection + filtering orchestration - 6 specialized executors: DDL, DML, Query, Metadata, Cluster, ACL Testing & Coverage: - Added 201 comprehensive unit tests (all passing) - Test coverage: 70.4% instruction, 58.2% line - Removed 120 lines of dead code (ALTER SERVER TAG feature) Code Quality: - Java 8 compatible (replaced Map.of, List.of, etc.) - License headers compliant - Checkstyle & Spotless formatting applied - Proper error handling with typed exceptions This refactoring provides a solid foundation for future CLI enhancements and fixes the WHERE clause filtering bug for Log table queries. test(cli): add tests for FlussCliMain, SqlCommand, and ReplShell - Add 28 new tests covering CLI entry points and argument parsing - Test coverage for FlussCliMain class (construction, command configuration) - Test coverage for SqlCommand class (field validation, PicoCLI annotations) - Test coverage for ReplShell class (constructor validation) - Total test count: 201 → 229 tests - Overall coverage remains at 70% (meets requirement) - Focus on testable components (constructors, annotations, metadata) - Execution paths requiring real cluster or interactive terminal remain untested Closes #2356 additional coverage requirements feat(cli): add streaming query support for log tables with LIMIT-based flow control Implement continuous polling mode for SELECT queries on log tables (tables without primary keys), controlled by the LIMIT clause. Key Changes: - Add LIMIT value extraction in QueryExecutor to detect batch vs streaming mode - Implement SqlOrderBy unwrapping in CalciteSqlParser and SqlExecutor (Calcite wraps LIMIT queries) - Add streaming mode with configurable idle timeout (30s) and continuous polling (5s interval) - Update CLI documentation with streaming vs batch mode behavior and examples Query Behavior: - Log tables without LIMIT: Streaming mode (continuous polling until idle timeout) - Log tables with LIMIT: Batch mode (read N rows and exit) - PK tables: Always batch mode (scan and exit) Testing: - Validated on real cluster (192.168.50.101:9123) - Successfully tested both streaming and batch modes with test_select_db.log_events Documentation: - Added comprehensive streaming mode section in cli.md - Clarified LIMIT support (no longer listed as unsupported) - Added query behavior matrix and use case examples test(cli): add unit tests for LIMIT and streaming mode Add comprehensive tests for: - SELECT with LIMIT clause to verify batch mode with row limits - SELECT with LIMIT 0 (edge case) - SELECT on log tables without LIMIT to verify streaming mode messages These tests validate the streaming query behavior implemented in the previous commit. feat(cli): add table type display in DESCRIBE and SHOW TABLE SCHEMA commands Enhance metadata output to clearly show table type at the top of the output. Changes: - Add 'Type:' line in DESCRIBE TABLE output showing 'Primary Key Table' or 'Log Table' - Add 'Type:' line in SHOW TABLE SCHEMA output for consistency - Improves usability by making table type immediately visible Example output: Table: test_select_db.log_events Type: Log Table ============================================================ This makes it easier for users to quickly identify whether a table is a PK table or Log table without needing to look at the Primary Key line. feat(cli): add multiple output formats (table, csv, json, tsv) for query results Add support for different output formats to make CLI output easier to process with external tools. Changes: - Add --output-format (-o) option to SqlCommand with choices: table, csv, json, tsv - Create OutputFormat enum for format selection - Implement CsvFormatter, JsonFormatter, and TsvFormatter alongside existing TableFormatter - Update QueryExecutor to support all output formats - Update SqlExecutor to pass output format through to executors - Add comprehensive documentation with usage examples and Unix tool integration Output Format Features: - table (default): Human-readable ASCII table format - csv: Comma-separated values (escaped properly) - json: JSON array of objects with proper type handling - tsv: Tab-separated values Use Cases: - csv/tsv: Easy processing with awk, sed, Excel imports - json: Integration with jq, APIs, scripts - table: Interactive terminal use and debugging Example usage: fluss-cli.sh sql -b host:9123 -o csv -e "SELECT * FROM db.table" fluss-cli.sh sql -b host:9123 -o json -e "SELECT * FROM db.table" | jq '.[].name' Tested on real cluster with all formats successfully processing data. feat(cli): add quiet mode, configurable streaming timeout, and refactor formatters - Add -q/--quiet flag to suppress status messages for clean piping - Add --streaming-timeout option to configure idle timeout (default: 30s) - Refactor formatters to implement OutputFormatter interface (removes Object casting) - Update documentation with CLI options table and usage examples - All tests pass (237 tests, 0 failures) test(cli): add comprehensive tests for formatters, quiet mode, and streaming timeout - Add CsvFormatterTest with 9 tests for CSV output formatting - Add JsonFormatterTest with 9 tests for JSON output formatting - Add TsvFormatterTest with 8 tests for TSV output formatting - Add OutputFormatTest with 8 tests for format string parsing - Add 8 new tests to SqlExecutorSelectTest for quiet mode and custom timeout * testSelectWithQuietModeHidesStatusMessages * testSelectLookupWithQuietModeHidesOptimization * testStreamingWithQuietModeHidesWarnings * testQuietModeWithCsvFormat * testQuietModeWithJsonFormat * testCustomStreamingTimeout60Seconds * testCustomStreamingTimeout10Seconds * testCombineQuietAndCustomTimeout Total new tests added: 42 tests All tests pass successfully docs(cli): add testing and development section to documentation - Add comprehensive testing section with examples - Document test coverage by package (>70% total, 97% for formatters) - Provide testing patterns for new features - Include build commands and test execution instructions - Add test categories overview (formatter, executor, utility tests) Report URL: https://github.com/apache/fluss/actions/runs/21112977665 With regards, GitHub Actions via GitBox
