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
2 changes: 1 addition & 1 deletion arrow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@dpkit/file": "workspace:*",
"@dpkit/table": "workspace:*",
"csv-sniffer": "^0.1.1",
"nodejs-polars": "^0.21.1"
"nodejs-polars": "^0.21.2"
},
"devDependencies": {
"@dpkit/test": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion csv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@dpkit/file": "workspace:*",
"@dpkit/table": "workspace:*",
"csv-sniffer": "^0.1.1",
"nodejs-polars": "^0.21.1"
"nodejs-polars": "^0.21.2"
},
"devDependencies": {
"@dpkit/test": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"libsql": "^0.6.0-pre.20",
"lru-cache": "^11.2.1",
"mysql2": "^3.14.4",
"nodejs-polars": "^0.21.1",
"nodejs-polars": "^0.21.2",
"pg": "^8.16.3"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@astrojs/starlight": "0.35.2",
"@dpkit/all": "workspace:*",
"astro": "5.12.9",
"nodejs-polars": "0.21.1",
"nodejs-polars": "0.21.2",
"sharp": "0.34.2",
"starlight-changelogs": "0.1.1",
"starlight-scroll-to-top": "0.3.1",
Expand Down
2 changes: 1 addition & 1 deletion dpkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"es-toolkit": "^1.39.10",
"exit-hook": "^4.0.0",
"ink": "^6.3.1",
"nodejs-polars": "^0.21.0",
"nodejs-polars": "^0.21.2",
"picocolors": "^1.1.1",
"react": "^19.1.1",
"react-devtools-core": "^6.1.2",
Expand Down
2 changes: 1 addition & 1 deletion inline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "tsc"
},
"dependencies": {
"nodejs-polars": "^0.21.1",
"nodejs-polars": "^0.21.2",
"@dpkit/core": "workspace:*",
"@dpkit/table": "workspace:*"
}
Expand Down
2 changes: 1 addition & 1 deletion json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@dpkit/file": "workspace:*",
"@dpkit/table": "workspace:*",
"csv-sniffer": "^0.1.1",
"nodejs-polars": "^0.21.1"
"nodejs-polars": "^0.21.2"
},
"devDependencies": {
"@dpkit/test": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion ods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@dpkit/core": "workspace:*",
"@dpkit/file": "workspace:*",
"@dpkit/table": "workspace:*",
"nodejs-polars": "^0.21.1",
"nodejs-polars": "^0.21.2",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion parquet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@dpkit/file": "workspace:*",
"@dpkit/table": "workspace:*",
"csv-sniffer": "^0.1.1",
"nodejs-polars": "^0.21.1"
"nodejs-polars": "^0.21.2"
},
"devDependencies": {
"@dpkit/test": "workspace:*"
Expand Down
114 changes: 57 additions & 57 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion table/field/types/list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ describe("stringifyListField", () => {
// Empty array
[[], ""],
])("%s -> %s", async (value, expected) => {
const table = DataFrame([Series("name", [value], DataType.String)]).lazy()
const table = DataFrame([
Series("name", [value], DataType.List(DataType.String)),
]).lazy()

const schema = {
fields: [{ name: "name", type: "list" as const, delimiter: ";" }],
Expand Down
4 changes: 2 additions & 2 deletions table/field/types/time.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { denormalizeTable } from "../../table/index.ts"
describe("parseTimeField", () => {
it.each([
// Default format tests
["06:00:00", 6 * 60 * 60 * 10 ** 9, {}],
["06:00:00", "06:00:00", {}],
// #TODO: Clarify the behavior on the Standard level first
//["06:00:00Z", 6 * 60 * 60 * 10 ** 9, {}],
["09:00", null, {}], // Incomplete time
Expand All @@ -16,7 +16,7 @@ describe("parseTimeField", () => {
["", null, {}],

// Custom format tests
["06:00", 6 * 60 * 60 * 10 ** 9, { format: "%H:%M" }],
["06:00", "06:00:00", { format: "%H:%M" }],
["06:50", null, { format: "%M:%H" }], // Invalid format
["3:00 am", null, { format: "%H:%M" }], // Not matching the format
["some night", null, { format: "%H:%M" }],
Expand Down
2 changes: 1 addition & 1 deletion table/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "tsc"
},
"dependencies": {
"nodejs-polars": "^0.21.1",
"nodejs-polars": "^0.21.2",
"@dpkit/core": "workspace:*"
}
}
10 changes: 8 additions & 2 deletions table/schema/infer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@ export function inferSchemaFromSample(
throw new Error(`Field "${name}" not found in the table`)
}

let type =
fieldTypes?.[name] ?? typeMapping[polarsField.type.variant] ?? "any"
// TODO: Remove this workaround once the issue is fixed
// https://github.com/pola-rs/nodejs-polars/issues/372
let variant = polarsField.type.variant as string
if (!typeMapping[variant]) {
variant = variant.slice(0, -1)
}

let type = fieldTypes?.[name] ?? typeMapping[variant] ?? "any"

if (type === "array" && options?.arrayType === "list") {
type = "list"
Expand Down
2 changes: 1 addition & 1 deletion xlsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@dpkit/core": "workspace:*",
"@dpkit/file": "workspace:*",
"@dpkit/table": "workspace:*",
"nodejs-polars": "^0.21.1",
"nodejs-polars": "^0.21.2",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
},
"devDependencies": {
Expand Down
Loading