Skip to content

Commit

Permalink
use view for <50MB
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Nov 1, 2024
1 parent 4416dd3 commit 7704416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/stdlib/duckdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ async function insertFile(database, name, file, options) {
});
}
if (/\.parquet$/i.test(file.name)) {
const table = file.size < 10e6 ? "TABLE" : "VIEW"; // for small files, materialize the table
const table = file.size < 50e6 ? "TABLE" : "VIEW"; // for small files, materialize the table
return await connection.query(`CREATE ${table} '${name}' AS SELECT * FROM parquet_scan('${file.name}')`);
}
if (/\.(db|ddb|duckdb)$/i.test(file.name)) {
Expand Down

0 comments on commit 7704416

Please sign in to comment.