Skip to content
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

Feature: Policy return null(string) #14816

Closed
wubx opened this issue Mar 3, 2024 · 1 comment
Closed

Feature: Policy return null(string) #14816

wubx opened this issue Mar 3, 2024 · 1 comment
Assignees
Labels
C-feature Category: feature

Comments

@wubx
Copy link
Member

wubx commented Mar 3, 2024

Summary

https://docs.databend.com/sql/sql-commands/ddl/mask-policy/create-mask-policy#examples

CREATE TABLE user_info (
    id INT,
    email STRING
);
CREATE MASKING POLICY email_mask
AS
  (val string)
  RETURNS string ->

ALTER TABLE user_info MODIFY COLUMN email SET MASKING POLICY email_mask;
error: APIError: ResponseError with 1114: Column 'email' data type string null does not match to the mask policy type string

becuse email is varchar null

@wubx wubx added the C-feature Category: feature label Mar 3, 2024
@sundy-li sundy-li changed the title Feature: Policy retrun null(string) Feature: Policy return null(string) Sep 3, 2024
@sundy-li
Copy link
Member

sundy-li commented Sep 3, 2024

🐳 :) CREATE MASKING POLICY email_mask
AS
  (val string)
  RETURNS string -> 'a';
processed in (0.045 sec)

@sundy-li sundy-li closed this as completed Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature
Projects
None yet
Development

No branches or pull requests

3 participants