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

Maybe a bug of configure select via WEB? #542

Open
Mrzyxing opened this issue Nov 1, 2024 · 1 comment
Open

Maybe a bug of configure select via WEB? #542

Mrzyxing opened this issue Nov 1, 2024 · 1 comment

Comments

@Mrzyxing
Copy link

Mrzyxing commented Nov 1, 2024

My workaround is under version 12 and TrinoGatewayRunner.

  • Try edit selectros rule via WEB
    Image
  • Frontend post json
    Image
  • But backends read missing values as null !
    Image

And this will also cause SelectorsDao.java error with null values.

@SqlQuery("""
            SELECT * FROM selectors
            WHERE
                resource_group_id = :resourceGroupId
                AND priority      = :priority
                AND user_regex    IS NOT DISTINCT FROM :userRegex
                AND source_regex  IS NOT DISTINCT FROM :sourceRegex
                AND query_type    IS NOT DISTINCT FROM :queryType
                AND client_tags   IS NOT DISTINCT FROM :clientTags
                AND selector_resource_estimate IS NOT DISTINCT FROM :selectorResourceEstimate
            LIMIT 1
            """)
    Selectors findFirst(@BindBean ResourceGroupsManager.SelectorsDetail selector);

Is here:

  1. Some error on backend receive the data of frontends?(I am work on it but may not have enough time.)
  2. Maybe a more compatible range of values for the DAO, such as null?
    Not sure, is mysql not support is distinct from but <=> ?
@Mrzyxing
Copy link
Author

Mrzyxing commented Nov 1, 2024

Maybe just figure it out before leave my desk, it looks like airlift json module provides a stricter deserialization rule this will cause the AbstractJacksonMapper.readFrom() can not write the value to object.
More info about jackson can not deserialize maybe detect properties on interface default class filed cause problem, my current solution is explicitly add annotations to the setter and it worked.
And sorry for misunderstanding about is distinct from expression,it just worked fine.This is the first time to know this NULL safe equal and not really sure this worked for every version of mysql.

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

No branches or pull requests

1 participant