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

[Task] SQL in Browser #597

Open
mikebarkmin opened this issue Aug 14, 2022 · 0 comments
Open

[Task] SQL in Browser #597

mikebarkmin opened this issue Aug 14, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@mikebarkmin
Copy link
Member

mikebarkmin commented Aug 14, 2022

We can use sql.js to evaluate SQL in browser and on the server. This should help with providing both client and server evaluation of a task.

The task needs a few settings:

  • instruction: string
  • defaultQuery: string

For evaluation, it should check whether the resulting datasets are equal. We can use EXCEPT to check that.

  • db: URL to a sqlite3 database
  • query: Solution query to compare against

For feedback, there should be a few checks:

  • Report mismatched row count: If EXCEPT returns rows
  • Report mismatched column count: If EXCEPT errors with "SELECTs to the left and right of EXCEPT do not have the same number of result columns"
  • Report mismatched/unordered columns: If EXCEPT returns all rows
  • Show query result as table

For the UI, we only need a code input with highlighting for the SQL query.

@mikebarkmin mikebarkmin added the enhancement New feature or request label Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant