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

Playground doesn't show results #3054

Closed
1 of 2 tasks
richb-hanover opened this issue Jul 25, 2023 · 14 comments · Fixed by #3072 or #3076
Closed
1 of 2 tasks

Playground doesn't show results #3054

richb-hanover opened this issue Jul 25, 2023 · 14 comments · Fixed by #3072 or #3076
Labels
bug Invalid compiler output or panic

Comments

@richb-hanover
Copy link
Contributor

What happened?

Using the 0.9.0 release, the official Playground does not show any results in the right-hand pane (nothing for the generated SQL or the SQL results)

Even abbreviating the PRQL query to from invoices there is no output.

PRQL input

from invoices

SQL output

-- none --

Expected SQL output

No response

MVCE confirmation

  • Minimal example
  • New issue

Anything else?

No response

@richb-hanover richb-hanover added the bug Invalid compiler output or panic label Jul 25, 2023
@richb-hanover
Copy link
Contributor Author

Hmmm... I bet this is related to #3047. Closing it

@eitsupi
Copy link
Member

eitsupi commented Jul 25, 2023

Let it keep opened.

@eitsupi eitsupi reopened this Jul 25, 2023
@max-sixty
Copy link
Member

Thanks @richb-hanover . We're urgently trying to fix now given we just hit HN again.

I don't think it's #3047 — playground doesn't rely on crates.io.

@max-sixty
Copy link
Member

Looks like the same error as #2521 — we could try reverting any updates since then?

@max-sixty
Copy link
Member

#3071 is one thing, but I think unlikely to be it

max-sixty added a commit to max-sixty/prql that referenced this issue Jul 25, 2023
@max-sixty
Copy link
Member

Not sure this is fixed

@max-sixty
Copy link
Member

Super weird — it seems to work for some folks, like @snth https://discord.com/channels/936728116712316989/945832228011798528/1133498403414880399

I think maybe it was only broken on Firefox?

@snth
Copy link
Member

snth commented Jul 25, 2023

Yes, it's been working fine for me on Chrome.

@richb-hanover
Copy link
Contributor Author

Just now (2230 on 25 Jul 2023 UTC) I saw errors with both Chrome 116.0.5845.42 and Firefox 115.0.2 on macOS 12.6.7. Both Chrome and Firefox showed substantially the same errors.

The Playground displayed SQL output for the default (complicated) PRQL query. I did not check it to see if it made sense. The SQL output for a simple from invoices was reasonable. The comment showed "PRQL version 0.9.2"

However, the "output.arrow" for the default PRQL query displayed Error: Binder Error: Referenced column "customer_id" not found in FROM clause! Candidate bindings: "invoices.column0" , and the from invoices query showed this for the SQL result:

column0
--
[object Response]

Finally, I see these errors in the Firefox console:

Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq [simpleWorker.js:20:16](https://prql-lang.org/playground/playground/static/node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js)

You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker [simpleWorker.js:22:12](https://prql-lang.org/playground/playground/static/node_modules/monaco-editor/esm/vs/base/common/worker/simpleWorker.js)

Object { timestamp: Date Tue Jul 25 2023 18:29:13 GMT-0400 (Eastern Daylight Time), level: 2, origin: 4, topic: 4, event: 4, value: "WITH table_1 AS (\n  SELECT\n    customer_id,\n    total - 0.8 AS _expr_0,\n    invoice_date\n  FROM\n    invoices\n),\ntable_0 AS (\n  SELECT\n    COALESCE(SUM(_expr_0), 0) AS sum_income,\n    COUNT(*) AS ct,\n    customer_id\n  FROM\n    table_1\n  WHERE\n    _expr_0 > 5\n    AND invoice_date >= DATE '2010-01-16'\n  GROUP BY\n    customer_id\n)\nSELECT\n  c.customer_id,\n  CONCAT(c.last_name, ', ', c.first_name) AS name,\n  table_0.sum_income,\n  table_0.ct,\n  version() AS db_version\nFROM\n  table_0\n  JOIN customers AS c ON table_0.customer_id = c.customer_id\nORDER BY\n  table_0.sum_income DESC\nLIMIT\n  10\n\n-- Generated by PRQL compiler version:0.9.2 (https://prql-lang.org/)\n" }
[log.ts:70:20](https://prql-lang.org/playground/playground/static/node_modules/@duckdb/duckdb-wasm/src/log.ts)

I hope this is helpful.

@eitsupi
Copy link
Member

eitsupi commented Jul 25, 2023

Thanks @richb-hanover, I can repro that.
image
image

@eitsupi eitsupi reopened this Jul 25, 2023
@max-sixty
Copy link
Member

max-sixty commented Jul 25, 2023

Thanks a lot @richb-hanover .

I think #3079 fixes — I can repro locally

@max-sixty
Copy link
Member

This is actually still broken — I must have missed something when whizzing through earlier. 

Is it anything to do with how we upload the data? It looks like we have it in a different representation...

@aljazerzen
Copy link
Member

Finally closed by #3102

@richb-hanover
Copy link
Contributor Author

I agree - it looks fixed to me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Invalid compiler output or panic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants