Skip to content

Commit adcb63d

Browse files
committed
fix: query-do executeLanceWholeFile inverted fragmentLoad return code check
fragmentLoad returns 0 on success (matching loadFragment wrapper at wasm-engine.ts:777), but executeLanceWholeFile threw on 0 — meaning valid Lance files without page metadata always failed. Inverted to !== 0 to match the error-code convention.
1 parent 68c28bb commit adcb63d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/query-do.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ export class QueryDO extends DurableObject<Env> {
894894
.set(new Uint8Array(fileData));
895895

896896
const loadResult = this.wasmEngine.exports.fragmentLoad(dataPtr, fileData.byteLength);
897-
if (loadResult === 0) throw new QueryModeError("INVALID_FORMAT", `Failed to load Lance fragment (invalid file?)`);
897+
if (loadResult !== 0) throw new QueryModeError("INVALID_FORMAT", `Failed to load Lance fragment (invalid file?)`);
898898

899899
// Parse Lance v2 column metadata using shared parser
900900
const dataset = this.datasetCache.get(query.table);

0 commit comments

Comments
 (0)