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

bug: panic on column reference both in select_list and GROUP BY element #130

Open
laysakura opened this issue May 11, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@laysakura
Copy link
Contributor

laysakura commented May 11, 2022

How to reproduce

        CREATE PUMP avg_by_ticker AS
        INSERT INTO sink_avg_by_ticker (ticker, avg_amount)
        SELECT STREAM
            source_trade.ticker,  -- here
            AVG(source_trade.amount) AS avg_amount
        FROM source_trade
        GROUP BY source_trade.ticker  -- and here
        FIXED WINDOW DURATION_SECS(10), DURATION_SECS(0);

Got

[2022-05-11T02:21:47Z ERROR springql_core::stream_engine::autonomous_executor] Sql(GROUP BY label not found: ValueExprLabel(1))

Workaround

Use alias

        CREATE PUMP avg_by_ticker AS
        INSERT INTO sink_avg_by_ticker (ticker, avg_amount)
        SELECT STREAM
            source_trade.ticker AS ticker,
            AVG(source_trade.amount) AS avg_amount
        FROM source_trade
        GROUP BY ticker
        FIXED WINDOW DURATION_SECS(10), DURATION_SECS(0);
@laysakura laysakura changed the title bug: panic on multiple GROUP BY elements bug: panic on column reference both in select_list and GROUP BY element May 11, 2022
@laysakura laysakura added the bug Something isn't working label May 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant