cmc-csci143 icon indicating copy to clipboard operation
cmc-csci143 copied to clipboard

Test cases failing for Pagila SQL queries

Open max-baum opened this issue 9 months ago • 1 comments

Hi --

Has anyone encountered the ./run_tests.sh test cases failing for a certain query, because of small differences between your output and the expected. For example, I have included the diff for 17.sql and 11.sql below. Any thoughts on fixes? Thanks!

$ diff results/17.out expected/17.out
24c24
<  China                                 | 5802.73
---
>  China                                 | 5798.74
45c45
<  India                                 | 6630.27
---
>  India                                 | 6628.28
51c51
<  Japan                                 | 3471.74
---
>  Japan                                 | 3470.75
93c93
<  Taiwan                                | 1210.94
---
>  Taiwan                                | 1209.95
103,104c103,104
<  United Kingdom                        |  924.80
<  United States                         | 4110.32
---
>  United Kingdom                        |  922.81
>  United States                         | 4120.27
112d111
< 
diff results/11.out expected/11.out
32d31
<      416 | HIGHBALL POTTER      |     6
33a33
>      416 | HIGHBALL POTTER      |     6
58d57
< 

max-baum avatar Mar 03 '25 22:03 max-baum

In your output for 17, you can see that the second column is not actually the same in the expect and results folders. This means that something about your query is not capturing the correct rows. You're most likely not joining the correct tables as in the discussion at https://github.com/mikeizbicki/cmc-csci143/issues/649.

In the output of 11, the rows are the same contents, but they are placed in different locations. This means that there is a problem with your ORDER BY clause.

mikeizbicki avatar Mar 04 '25 04:03 mikeizbicki