Skip to content

Conversation

jraymakers
Copy link
Contributor

@jraymakers jraymakers commented Jun 13, 2025

PIVOT is transformed into multiple statements by the parser. Since PendingQuery doesn't support multiple statements, this causes PIVOT statements to fail when used with send.

This change fixes this by using ExtractStatements to transform the text passed to WebDB::Connection::PendingQuery into possibly multiple parsed statements. Each one is run in turn; results are returned for the last one.

I added a unit test for this case. I did have to skip some of the checks (of the aggregated values) on Node, because they were returned as different types depending on the build (loadable or not). They work fine in the browser.

@jraymakers
Copy link
Contributor Author

@carlopi Finally got the tests to pass.

@carlopi
Copy link
Collaborator

carlopi commented Jun 15, 2025

Thanks!

@carlopi carlopi merged commit ab2ee91 into duckdb:main Jun 15, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants