You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chrislu
179a7b446e
feat: Add comprehensive string functions with extensive tests
Implemented String Functions:
- LENGTH: Get string length (supports all value types)
- UPPER/LOWER: Case conversion
- TRIM/LTRIM/RTRIM: Whitespace removal (space, tab, newline, carriage return)
- SUBSTRING: Extract substring with optional length (SQL 1-based indexing)
- CONCAT: Concatenate multiple values (supports mixed types, skips nulls)
- REPLACE: Replace all occurrences of substring
- POSITION: Find substring position (1-based, 0 if not found)
- LEFT/RIGHT: Extract leftmost/rightmost characters
- REVERSE: Reverse string with proper Unicode support
Key Features:
- Robust type conversion (string, int, float, bool, bytes)
- Unicode-safe operations (proper rune handling in REVERSE)
- SQL-compatible indexing (1-based for SUBSTRING, POSITION)
- Comprehensive error handling with descriptive messages
- Mixed-type support (e.g., CONCAT number with string)
Helper Functions:
- valueToString: Convert any schema_pb.Value to string
- valueToInt64: Convert numeric values to int64
Comprehensive test suite with 25+ test cases covering:
- All string functions with typical use cases
- Type conversion scenarios (numbers, booleans)
- Edge cases (empty strings, null values, Unicode)
- Error conditions and boundary testing
All tests passing ✅
|
1 month ago |
.. |
aggregations.go
|
change to pg_query_go
|
1 month ago |
broker_client.go
|
fix todo
|
1 month ago |
catalog.go
|
handling errors
|
1 month ago |
data_conversion.go
|
refactor
|
1 month ago |
describe.go
|
no more mysql
|
1 month ago |
engine.go
|
handling errors
|
1 month ago |
engine_test.go
|
change to pg_query_go
|
1 month ago |
errors.go
|
handling errors
|
1 month ago |
hybrid_message_scanner.go
|
fix
|
1 month ago |
hybrid_test.go
|
improve tests
|
1 month ago |
mock_test.go
|
use mock for testing
|
1 month ago |
mocks_test.go
|
fix todo
|
1 month ago |
parquet_scanner.go
|
fix todo
|
1 month ago |
query_parsing_test.go
|
fix
|
1 month ago |
real_namespace_test.go
|
fix tests
|
1 month ago |
schema_parsing_test.go
|
improve tests
|
1 month ago |
select_test.go
|
improve tests
|
1 month ago |
sql_functions.go
|
feat: Add comprehensive string functions with extensive tests
|
1 month ago |
sql_functions_test.go
|
feat: Add comprehensive string functions with extensive tests
|
1 month ago |
sql_parser_config.go
|
no more mysql
|
1 month ago |
sql_types.go
|
change to pg_query_go
|
1 month ago |
system_columns.go
|
fix after refactoring
|
1 month ago |
test_noschema_error.go
|
fix todo
|
1 month ago |
time_filter_test.go
|
fix
|
1 month ago |
types.go
|
fix todo
|
1 month ago |
window_functions_demo.go
|
feat: Add window function foundation with timestamp support
|
1 month ago |