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

sqlsmith: Panicked when handling the request: predicate push down fails to generate equivalent plan #17964

Open
kwannoel opened this issue Aug 8, 2024 · 0 comments
Labels
found-by-sqlsmith type/bug Something isn't working

Comments

@kwannoel
Copy link
Contributor

kwannoel commented Aug 8, 2024

Describe the bug

No response

Error message/log

thread 'main' panicked at /risingwave/src/tests/sqlsmith/src/test_runners/fuzzing.rs:171:10:
called `Result::unwrap()` on an `Err` value: Encountered unexpected error: db error: ERROR: Panicked when handling the request: predicate push down fails to generate equivalent plan.
Input schema: Schema { fields: ['Wq2JLQ84LH':Varchar:Varchar, $expr10003:Float64, 236:Int16:Int16, 219:Int32:Int32] }
Input plan: 
LogicalFilter { predicate: true }
└─LogicalProject { exprs: ['Wq2JLQ84LH':Varchar, false:Boolean, 236:Int16, 219:Int32] }
  └─LogicalAgg { aggs: [sum(distinct 227:Float64)] }
    └─LogicalProject { exprs: [227:Float64] }
      └─LogicalValues { rows: [], schema: Schema { fields: [bid.date_time:Timestamp] } }
Output schema: Schema { fields: ['Wq2JLQ84LH':Varchar:Varchar, false:Boolean:Boolean, 236:Int16:Int16, 219:Int32:Int32] }

Output plan: 
LogicalProject { exprs: ['Wq2JLQ84LH':Varchar, false:Boolean, 236:Int16, 219:Int32] }
└─LogicalAgg { aggs: [sum(distinct 227:Float64)] }
  └─LogicalProject { exprs: [227:Float64] }
    └─LogicalValues { rows: [], schema: Schema { fields: [bid.date_time:Timestamp] } }
SQL: SELECT sq_4.col_2 AS col_0, sq_4.col_0 AS col_1, ('pyxdgO9UYd') AS col_2, sq_4.col_0 AS col_3 FROM (WITH with_2 AS (SELECT t_3.date_time AS col_0 FROM bid AS t_3 WHERE ((952) IS NULL) GROUP BY t_3.url, t_3.date_time, t_3.extra HAVING false ORDER BY t_3.extra DESC NULLS FIRST) SELECT 'Wq2JLQ84LH' AS col_0, (CAST(NULL AS rw_int256) / sum(DISTINCT (FLOAT '227')) FILTER(WHERE true)) AS col_1, (SMALLINT '236') AS col_2, (INT '219') AS col_3 FROM with_2 WHERE false) AS sq_4 WHERE true GROUP BY sq_4.col_0, sq_4.col_2 HAVING true ORDER BY sq_4.col_2 DESC NULLS LAST, sq_4.col_0 DESC NULLS LAST, sq_4.col_0, sq_4.col_2 ASC, sq_4.col_2 NULLS LAST, sq_4.col_0 DESC NULLS LAST LIMIT 5

SQL: SELECT sq_4.col_2 AS col_0, sq_4.col_0 AS col_1, ('pyxdgO9UYd') AS col_2, sq_4.col_0 AS col_3 FROM (WITH with_2 AS (SELECT t_3.date_time AS col_0 FROM bid AS t_3 WHERE ((952) IS NULL) GROUP BY t_3.url, t_3.date_time, t_3.extra HAVING false ORDER BY t_3.extra DESC NULLS FIRST) SELECT 'Wq2JLQ84LH' AS col_0, (CAST(NULL AS rw_int256) / sum(DISTINCT (FLOAT '227')) FILTER(WHERE true)) AS col_1, (SMALLINT '236') AS col_2, (INT '219') AS col_3 FROM with_2 WHERE false) AS sq_4 WHERE true GROUP BY sq_4.col_0, sq_4.col_2 HAVING true ORDER BY sq_4.col_2 DESC NULLS LAST, sq_4.col_0 DESC NULLS LAST, sq_4.col_0, sq_4.col_2 ASC, sq_4.col_2 NULLS LAST, sq_4.col_0 DESC NULLS LAST LIMIT 5
This is a bug. We would appreciate a bug report at:
  https://github.com/risingwavelabs/risingwave/issues/new?labels=type%2Fbug&template=bug_report.yml

To Reproduce

error.sql.log

psql -f error.sql.log

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@kwannoel kwannoel added the type/bug Something isn't working label Aug 8, 2024
@kwannoel kwannoel changed the title Panicked when handling the request: predicate push down fails to generate equivalent plan sqlsmith: Panicked when handling the request: predicate push down fails to generate equivalent plan Aug 8, 2024
@github-actions github-actions bot added this to the release-2.0 milestone Aug 8, 2024
@kwannoel kwannoel modified the milestones: release-2.0, release-2.1 Aug 19, 2024
@kwannoel kwannoel removed this from the release-2.2 milestone Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
found-by-sqlsmith type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant