Skip to content

Conversation

@Light2Dark
Copy link
Contributor

@Light2Dark Light2Dark commented Sep 22, 2025

📝 Summary

This runs queries in EXPLAIN mode on keypress. It's only enabled when feat flag is on & using Duckdb engine.

The feat flag is not exposed.

CleanShot.2025-09-24.at.01.01.54.mp4

🔍 Description of Changes

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

@vercel
Copy link

vercel bot commented Sep 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Sep 23, 2025 6:34pm

@github-actions github-actions bot added the bash-focus Area to focus on during release bug bash label Sep 22, 2025
@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@Light2Dark Light2Dark changed the title wip: validate sql mode wip: sql mode - validate Sep 22, 2025
@Light2Dark Light2Dark force-pushed the sham/validate-sql-mode branch from 78b784f to e4ceb06 Compare September 23, 2025 04:40
@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@Light2Dark Light2Dark changed the title wip: sql mode - validate sql mode - validate Sep 23, 2025
@Light2Dark Light2Dark changed the title sql mode - validate sql mode - validate for duckdb Sep 23, 2025
@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

</div>
</div>
{sqlValidationError && (
<SqlValidationError error={sqlValidationError} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in order to avoid an additional re-render of this component, you could make this <CellSqlValidationError cellId={cellId}/> which uses <SqlValidationError

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

@Light2Dark
Copy link
Contributor Author

Todo in next PRs:

  • add lint endpoint
  • create custom parser which calls the endpoint

@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

1 similar comment
@github-actions
Copy link

Breaking changes detected in the OpenAPI specification!

}

function sqlValidationExtension(): Extension {
let debounceTimeout: NodeJS.Timeout | null = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be int. if the type give you a hard time, you can change setTimeout to window.setTimeout and window.clearTimeout

} catch (error) {
Logger.warn("Failed to validate SQL", { error });
}
}, 300);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe pull up to the top

request_id=request.request_id,
result=None, # We aren't using the result yet
error=error,
).broadcast()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add tests for this code path? maybe un test_runtime.py

@Light2Dark Light2Dark merged commit 075a34c into main Sep 24, 2025
37 of 65 checks passed
@Light2Dark Light2Dark deleted the sham/validate-sql-mode branch September 24, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bash-focus Area to focus on during release bug bash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants