[Bug]: Spurious(?) Error messages during build: Failed to pre-render columns Parser Error: syntax error at or near "SELECT"
Describe the bug
During build process, Evidence spits out error messages to do with the pre-rendering of columns
Steps to Reproduce
- Clean install on "@evidence-dev/evidence": "^39.1.3",
-
npm run build - Observe build logs
Logs
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 22.66s
Failed to pre-render columns Parser Error: syntax error at or near "SELECT"
LINE 2: DESCRIBE SELECT * FROM (select
^
Failed to pre-render columns Parser Error: syntax error at or near "SELECT"
LINE 2: DESCRIBE SELECT * FROM (SELECT DISTINCT category AS "value", category AS "label" FROM (SELECT * FROM (select
category
from needful_things.orders
group by category
) AS "inputQuery-jV")
) AS "inputQuery-5v"
...
^
Failed to pre-render columns Parser Error: syntax error at or near "SELECT"
LINE 2: DESCRIBE SELECT * FROM (select
^
Failed to pre-render columns Parser Error: syntax error at or near "SELECT"
LINE 2: DESCRIBE SELECT * FROM (SELECT DISTINCT category AS "value", category AS "label" FROM (SELECT * FROM (select
category
from needful_things.orders
group by category
) AS "inputQuery-Yw")
) AS "inputQuery-Up"
...
System Info
System:
OS: macOS 14.2.1
CPU: (10) arm64 Apple M1 Pro
Memory: 84.97 MB / 16.00 GB
Shell: 5.1.16 - /opt/homebrew/bin/bash
Binaries:
Node: 20.15.0 - ~/.nvm/versions/node/v20.15.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v20.15.0/bin/yarn
npm: 10.7.0 - ~/.nvm/versions/node/v20.15.0/bin/npm
pnpm: 8.6.9 - /opt/homebrew/bin/pnpm
bun: 1.0.25 - /opt/homebrew/bin/bun
Browsers:
Brave Browser: 123.1.64.122
Chrome: 127.0.6533.100
Safari: 17.2.1
npmPackages:
@evidence-dev/bigquery: ^2.0.7 => 2.0.7
@evidence-dev/core-components: ^4.7.4 => 4.7.4
@evidence-dev/csv: ^1.0.12 => 1.0.12
@evidence-dev/databricks: ^1.0.7 => 1.0.7
@evidence-dev/duckdb: ^1.0.11 => 1.0.11
@evidence-dev/evidence: ^39.1.3 => 39.1.3
@evidence-dev/motherduck: ^1.0.2 => 1.0.2
@evidence-dev/mssql: ^1.0.9 => 1.0.9
@evidence-dev/mysql: ^1.1.3 => 1.1.3
@evidence-dev/postgres: ^1.0.6 => 1.0.6
@evidence-dev/snowflake: ^1.1.0 => 1.1.0
@evidence-dev/sqlite: ^2.0.6 => 2.0.6
@evidence-dev/trino: ^1.0.8 => 1.0.8
Severity
annoyance
Additional Information, or Workarounds
No response
Perhaps caused by https://github.com/evidence-dev/evidence/pull/2261/files
@zachstence Probably related: https://github.com/evidence-dev/evidence/issues/2437 This seems to be affecting a wide range of projects with no actual apparent issues otherwise - impacting cloud logs and builds
Can confirm it's not affecting 39.1.1 but affects all later versions.
It's throwing from here: https://github.com/evidence-dev/evidence/blob/2e8e8f63cda234d52caba23ab91666b38415c2a4/sites/example-project/src/pages/%2Blayout.js#L144
After some digging, I've discovered that the version 1.28.0 of @duckdb/duckdb-wasm has a bug where nested describes don't work (e.g. describe (describe select 1)). This bug appears to be fixed in later dev versions, but 1.28.1 has yet to have a stable release.
Regardless of this shortcoming, I think that there is some cleanup that could be done to our query running (we shouldn't be doing a nested describe). Cleaning this up would likely benefit build speed as well (however small that benefit may be) due to running unnecessary queries.