Skip to content

Functions with literals and params should type resolve #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 7, 2025

Conversation

tobyhede
Copy link
Contributor

@tobyhede tobyhede commented Mar 6, 2025

SQL statements containing literals or param placeholders currently trigger type check error.

-- The arg `'x'` causes mapping to fail.
-- This causes `encrypted_text` to fail to decrypt in the results.
select concat(plaintext, 'x'), encrypted_text from encrypted;

This change unifies function types with Type::any_native().
EQL values will be rejected in function calls, which is the correct behaviour in most situations as EQL columns need to be decrypted.

eg, concat(encrypted_column, 'str') will attempt to concat the encrypted json data.

Future work will add support for the EQL functions.

@tobyhede tobyhede force-pushed the functions-with-literals-and-params branch 3 times, most recently from b8105df to 7f4b7a8 Compare March 7, 2025 03:27
@tobyhede tobyhede changed the title Functions with literals and params Functions with literals and params should type resolve Mar 7, 2025
@tobyhede tobyhede force-pushed the functions-with-literals-and-params branch from 7f4b7a8 to 9067a42 Compare March 7, 2025 03:30
Copy link
Contributor

@CDThomas CDThomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had a couple of minor comments around some unify calls that look redundant, but LGTM otherwise.

@tobyhede tobyhede force-pushed the functions-with-literals-and-params branch from 1043817 to c0ddae0 Compare March 7, 2025 04:03
@tobyhede tobyhede merged commit ed79f2e into main Mar 7, 2025
1 check passed
@tobyhede tobyhede deleted the functions-with-literals-and-params branch March 7, 2025 04:17
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.

2 participants