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

Incorrect results from SQL query referencing saved question with more than 1,048,575 rows #24969

Closed
calherries opened this issue Aug 24, 2022 · 0 comments · Fixed by #41051
Closed
Assignees
Labels
.Backend .Correctness Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/Processor .Team/QueryProcessor :hammer_and_wrench: Type:Bug Product defects
Milestone

Comments

@calherries
Copy link
Contributor

calherries commented Aug 24, 2022

Describe the bug

Using a saved question as the source of a native SQL question applies the absolute-max-row limit on a referenced saved question. This causes incorrect results if the number of rows in the results of the saved question exceeds the absolute-max-row limit of 1,048,575 rows.

To Reproduce

To reproduce this bug on stats.metabase.com:

  1. Open the query builder, using the Snowplow database, select the "Page Views" model for Data, and "Count rows of..." for summarization. Observe the result is over 1,048,575.
  2. Open a native SQL query editor, using the Snowplow database. Run this query: select count(*) from {{#3367}}. The result will be 1,048,575, even though we should get the same result as step 1.

Related to #24793

@flamber flamber added Querying/Processor .Correctness Querying/Parameters & Variables Filter widgets, field filters, variables etc. Querying/Nested Queries Questions based on other saved questions .Backend and removed .Needs Triage labels Aug 24, 2022
@luizarakaki luizarakaki added the Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness label Dec 13, 2023
@perivamsi perivamsi added the .Team/QueryProcessor :hammer_and_wrench: label Dec 19, 2023
@ranquild ranquild removed Querying/Parameters & Variables Filter widgets, field filters, variables etc. Querying/Nested Queries Questions based on other saved questions labels Jan 15, 2024
@dpsutton dpsutton added this to the 0.49.5 milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Backend .Correctness Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/Processor .Team/QueryProcessor :hammer_and_wrench: Type:Bug Product defects
Projects
None yet
6 participants