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

关于CCL配置的咨询 #433

Open
lijiaqi0121 opened this issue Jan 2, 2025 · 3 comments
Open

关于CCL配置的咨询 #433

lijiaqi0121 opened this issue Jan 2, 2025 · 3 comments

Comments

@lijiaqi0121
Copy link

Issue Type

CCL

Have you searched for existing issues?

Yes

Link to Relevant Documentation

No response

Question Details

场景需求如下:
用户A拥有数据表ta,用户B需要查询ta来进行计算,查询的sql语句类似:
SELECT 
    (
        CASE 
            WHEN ta.code1 IN ('01', '02') THEN 3000
            WHEN ta.code1 = '03' THEN 2000
            ELSE 0
        END +
        CASE 
            WHEN ta.code2 = 1 THEN 10000
            ELSE 0
        END +
        FLOOR(ta.value / 1000)
    ) AS result
FROM ta
WHERE ta.ID = 'id0001';
要求用户B能够查询到上述sql语句的计算结果,但是不能查询到ta中的数据
请问对应的CCL应该要怎么设置?
@secretflow secretflow deleted a comment from lanyy9527 Jan 2, 2025
@jingshi-ant
Copy link
Collaborator

当前CCL的粒度只覆盖了常见的场景,该语句里的ta.value暂时没法保护,只能设置为PLAINTEXT(即对B可见)

@jingshi-ant
Copy link
Collaborator

其它的字段设置为PLAINTEXT_AFTER_COMPARE即可

@lijiaqi0121
Copy link
Author

好的,谢谢

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

No branches or pull requests

2 participants