trinodb / trino-gateway

https://trinodb.github.io/trino-gateway/
Apache License 2.0
164 stars 73 forks source link

Maybe a bug of configure select via WEB? #542

Open Mrzyxing opened 4 weeks ago

Mrzyxing commented 4 weeks ago

My workaround is under version 12 and TrinoGatewayRunner.

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 commented 4 weeks ago

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.