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

After turning on the trino dialect,filtering during aggregation return wrong data #52640

Open
LZGH opened this issue Nov 5, 2024 · 4 comments
Labels
good first issue Good for newcomers type/bug Something isn't working

Comments

@LZGH
Copy link

LZGH commented Nov 5, 2024

Steps to reproduce the behavior (Required)

set sql_dialect = 'trino';
select
    sum(id) filter (
        where
            id <= 1
    ) as aaa
from
    (
        SELECT
            1 AS id,
            'Alice' AS name
        UNION
        ALL
        SELECT
            2 AS id,
            'Bob' AS name
    ) AS simulated_data;

Expected behavior (Required)

1

Real behavior (Required)

3

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
    3.3.4
@LZGH LZGH added the type/bug Something isn't working label Nov 5, 2024
@LZGH LZGH changed the title After turning on the trino dialect,filter function return wrong data After turning on the trino dialect,filtering during aggregation return wrong data Nov 7, 2024
@dirtysalt
Copy link
Contributor

dirtysalt commented Jan 15, 2025

@LZGH which version are you using right now?

I tried to reproduce this case.

set sql_dialect = 'trino';

And got following error

SQL Error [1064] [42000]: Trino parser parse sql error: [io.trino.sql.parser.ParsingException: line 7:8: mismatched input ','. Expecting: ], and StarRocks parser also can not parse: [com.starrocks.sql.parser.ParsingException: Getting syntax error at line 1, column 84. Detail message: Unexpected input '(', the most similar input is {, ';'}.]

Are my reproduce steps correct?

@LZGH
Copy link
Author

LZGH commented Jan 15, 2025

@LZGH which version are you using right now?

I tried to reproduce this case.

set sql_dialect = 'trino';

And got following error

SQL Error [1064] [42000]: Trino parser parse sql error: [io.trino.sql.parser.ParsingException: line 7:8: mismatched input ','. Expecting: ], and StarRocks parser also can not parse: [com.starrocks.sql.parser.ParsingException: Getting syntax error at line 1, column 84. Detail message: Unexpected input '(', the most similar input is {, ';'}.]

Are my reproduce steps correct?

3.3.4

@LZGH
Copy link
Author

LZGH commented Jan 15, 2025

@LZGH which version are you using right now?

I tried to reproduce this case.

set sql_dialect = 'trino';

And got following error

SQL Error [1064] [42000]: Trino parser parse sql error: [io.trino.sql.parser.ParsingException: line 7:8: mismatched input ','. Expecting: ], and StarRocks parser also can not parse: [com.starrocks.sql.parser.ParsingException: Getting syntax error at line 1, column 84. Detail message: Unexpected input '(', the most similar input is {, ';'}.]

Are my reproduce steps correct?

I have adjusted the example to make it easier to reproduce the problem.

@dirtysalt
Copy link
Contributor

According to our team members, we don't even have this feature in starrocks correct? @Youngwb

Do you think we should support them in near future?

@murphyatwork murphyatwork added the good first issue Good for newcomers label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants