Skip to content

Run the function tests that implicit-cast lookup (#418) now passes - #4

Open
alexskinner wants to merge 1 commit into
chore/bump-kitesql-main-522eb00from
chore/function-lookup-by-implicit-cast
Open

alexskinner wants to merge 1 commit into
chore/bump-kitesql-main-522eb00from
chore/function-lookup-by-implicit-cast

Conversation

@alexskinner

Copy link
Copy Markdown
Owner

Stacked on #3 (pin bump to KipData/KiteSQL 522eb00). Retarget to main after #3 merges.

Why

KipData/KiteSQL#418 resolves function arguments by implicit cast. Thirteen tests that were ignored because exact-type lookup could not reach functions on length-bounded columns or NULL arguments now pass:

length_function, left_right_functions, concat_functions, repeat_reverse_functions, locate_instr_position_functions, ltrim_rtrim_functions, length_in_order_by_on_varchar_column, isnull_function, substring_index_function, round_return_type_follows_argument, replace_on_bounded_columns_in_dml, string_function_edge_cases_match_mysql, round_null_handling.

Change

  • Removes #[ignore] from those tests.
  • Gives the tests that still fail accurate skip reasons:
    • Variadic GREATEST/LEAST, and CONCAT with more than 8 arguments, still need hook-functions. #418 resolves fixed arity only.
    • Numeric arguments to VARCHAR parameters (CONCAT('a', 1), LENGTH(int_col)) are not an implicit cast in core.
    • Exact DECIMAL literals need hook-numeric-typing.
    • Core POSITION is byte-based.
  • Updates the README hook table and a comment in src/functions.rs.

The per-type HEX, ISNULL and ROUND overloads stay on purpose. Their behaviour or result type follows the argument type, and routing integers through DOUBLE would lose precision. So this PR re-enables tests rather than removing code.

Testing

Locally: cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test and cargo test --test slt_default all pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant