Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion csv/table/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export async function loadCsvTable(
}

let dialect = await loadResourceDialect(resource.dialect)
if (!dialect) dialect = await inferCsvDialect(resource, options)
if (!dialect) {
dialect = await inferCsvDialect({ ...resource, path: paths[0] }, options)
}

const scanOptions = getScanOptions(resource, dialect)
const tables: Table[] = []
Expand Down
3 changes: 2 additions & 1 deletion file/stream/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ function limitBytesStream(inputStream: Readable, maxBytes: number) {
new Transform({
transform(chunk, _encoding, callback) {
if (total >= maxBytes) {
callback(new Error("Byte limit exceeded"))
this.push(null)
callback()
return
}

Expand Down