Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to rs-0.46 #309

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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 .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install latest Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-11-28
toolchain: nightly-2025-01-05
components: rustfmt, clippy
- name: Install ghp-import
uses: actions/setup-python@v5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-js.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install latest Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-11-28
toolchain: nightly-2025-01-05
components: rustfmt, clippy
- name: Check yarn version
run: yarn --version
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Install latest Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-11-28
toolchain: nightly-2025-01-05
components: rustfmt, clippy
- name: Bun version
uses: oven-sh/setup-bun@v1
Expand Down
511 changes: 256 additions & 255 deletions .yarn/releases/yarn-4.5.3.cjs → .yarn/releases/yarn-4.7.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.3.cjs
yarnPath: .yarn/releases/yarn-4.7.0.cjs
16 changes: 9 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nodejs-polars"
version = "0.17.0"
version = "0.18.0"
authors = ["Cory Grinstead"]
documentation = "https://pola-rs.github.io/polars-book/"
edition = "2021"
Expand All @@ -15,14 +15,16 @@ crate-type = ["cdylib", "lib"]
[dependencies]
ahash = "0.8.11"
bincode = "1.3.3"
napi = { version = "2.16.13", default-features = false, features = [
napi = { version = "2.16.16", default-features = false, features = [
"napi8",
"serde-json",
] }
napi-derive = { version = "2.16.13", default-features = false }
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "58a38af21dccaf3326514494a1db118601c8c2ca", default-features = false }
polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "58a38af21dccaf3326514494a1db118601c8c2ca", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "58a38af21dccaf3326514494a1db118601c8c2ca", default-features = false }
polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "f298ace880b238fb5793eaf0cdeb6b418e2ba583", default-features = false }
polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "f298ace880b238fb5793eaf0cdeb6b418e2ba583", default-features = false }
polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "f298ace880b238fb5793eaf0cdeb6b418e2ba583", default-features = false }
polars-ops = { git = "https://github.com/pola-rs/polars.git", rev = "f298ace880b238fb5793eaf0cdeb6b418e2ba583", default-features = false }
polars-arrow = { git = "https://github.com/pola-rs/polars.git", rev = "f298ace880b238fb5793eaf0cdeb6b418e2ba583", default-features = false }
thiserror = "1"
smartstring = { version = "1" }
serde_json = { version = "1" }
Expand Down Expand Up @@ -162,10 +164,10 @@ features = [
"azure"
]
git = "https://github.com/pola-rs/polars.git"
rev = "58a38af21dccaf3326514494a1db118601c8c2ca"
rev = "f298ace880b238fb5793eaf0cdeb6b418e2ba583"

[build-dependencies]
napi-build = "2.1.3"
napi-build = "2.1.4"

[profile.release]
codegen-units = 1
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,14 @@ Install the latest polars version with:
```sh
$ yarn add nodejs-polars # yarn
$ npm i -s nodejs-polars # npm
$ bun i -D nodejs-polars # Bun
```

Releases happen quite often (weekly / every few days) at the moment, so updating polars regularly to get the latest bugfixes / features might not be a bad idea.

### Minimum Requirements
- Node version `>=18`
- Rust version `>=1.59` - *Only needed for development*
- Rust version `>=1.86` - *Only needed for development*


## Deno
Expand All @@ -142,7 +143,7 @@ With Deno 1.37, you can use the `display` function to display a `DataFrame` in t

```typescript
import pl from "npm:nodejs-polars";
import { display } from "https://deno.land/x/[email protected].1/mod.ts";
import { display } from "https://deno.land/x/[email protected].2/mod.ts";

let response = await fetch(
"https://cdn.jsdelivr.net/npm/world-atlas@1/world/110m.tsv",
Expand Down Expand Up @@ -171,24 +172,22 @@ ___

## Documentation

Want to know about all the features Polars supports? Read the docs!
Want to know about all the features Polars supports? Read the [docs](https://docs.pola.rs)!

#### Python

- Installation guide: `$ pip3 install polars`
- [Python documentation](https://pola-rs.github.io/polars/py-polars/html/reference/index.html)
- [User guide](https://pola-rs.github.io/polars-book/)
- [User guide](https://docs.pola.rs)

#### Rust

- [Rust documentation (master branch)](https://pola-rs.github.io/polars/polars/index.html)
- [User guide](https://pola-rs.github.io/polars-book/)
- [Rust documentation](https://docs.rs/polars/latest/polars/)

#### Node

* Installation guide: `$ yarn install nodejs-polars`
* [Node documentation](https://pola-rs.github.io/nodejs-polars/)
* [User guide](https://pola-rs.github.io/polars-book/)

## Contribution

Expand Down
26 changes: 6 additions & 20 deletions __tests__/dataframe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("dataframe", () => {
const actual = expected.clone();
expect(actual).toFrameEqual(expected);
});
test.skip("describe", () => {
test("describe", () => {
const actual = pl
.DataFrame({
a: [1, 2, 3],
Expand Down Expand Up @@ -1829,26 +1829,12 @@ describe("io", () => {
});
test("JSON.stringify", () => {
const df = pl.DataFrame({
foo: [1],
bar: ["a"],
});
const expected = JSON.stringify({
columns: [
{
name: "foo",
datatype: "Float64",
bit_settings: "",
values: [1.0],
},
{
name: "bar",
datatype: "String",
bit_settings: "",
values: ["a"],
},
],
foo: [1, 2, 3],
bar: ["a", "b", "c"],
});
const actual = JSON.stringify(df);
const expected =
'[{"foo":1.0,"bar":"a"},{"foo":2.0,"bar":"b"},{"foo":3.0,"bar":"c"}]';
const actual = df.toJSON();
expect(actual).toEqual(expected);
});
test("toRecords", () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/lazyframe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("lazyframe", () => {
})
.lazy();
let actual = df.describeOptimizedPlan().replace(/\s+/g, " ");
const expected = `DF ["foo", "bar"]; PROJECT */2 COLUMNS; SELECTION: None`;
const expected = `DF ["foo", "bar"]; PROJECT */2 COLUMNS`;
expect(actual).toEqual(expected);
actual = df.describePlan().replace(/\s+/g, " ");
expect(actual).toEqual(expected);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/series.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ describe("generics", () => {
const arr2 = [...series];
expect<number[]>(arr2).toStrictEqual([1, 2, 3]);
});
test("to object", () => {
test.skip("to object", () => {
const obj = series.toObject();
expect<{ name: string; datatype: "Float64"; values: number[] }>(
obj,
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nodejs-polars",
"version": "0.17.0",
"version": "0.18.0",
"repository": "https://github.com/pola-rs/nodejs-polars.git",
"license": "MIT",
"main": "bin/index.js",
Expand Down Expand Up @@ -58,16 +58,16 @@
"@napi-rs/cli": "^2.18.4",
"@types/chance": "^1.1.6",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.1",
"@types/node": "^22.13.8",
"chance": "^1.1.12",
"jest": "^29.7.0",
"source-map-support": "^0.5.21",
"ts-jest": "^29.2.5",
"ts-jest": "^29.2.6",
"ts-node": "^10.9.2",
"typedoc": "^0.27.3",
"typescript": "5.7.2"
"typedoc": "^0.27.9",
"typescript": "5.8.2"
},
"packageManager": "yarn@4.5.3",
"packageManager": "yarn@4.7.0",
"workspaces": [
"benches"
]
Expand Down
19 changes: 6 additions & 13 deletions polars/dataframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ export interface DataFrame<T extends Record<string, Series> = any>
/**
* Replace a column at an index location.
*
* @warning typescript cannot encode type mutation,
* Warning: typescript cannot encode type mutation,
* so the type of the DataFrame will be incorrect. cast the type of dataframe manually.
* ___
* @param index - Column index
Expand Down Expand Up @@ -1484,7 +1484,7 @@ export interface DataFrame<T extends Record<string, Series> = any>
* Sort the DataFrame by column.
* ___
* @param by - Column(s) to sort by. Accepts expression input, including selectors. Strings are parsed as column names.
* @param reverse - Reverse/descending sort.
* @param @deprecated reverse - Reverse/descending sort. Use {@link param.descending} instead
* @param descending - Sort in descending order. When sorting by multiple columns, can be specified per column by passing a sequence of booleans.
* @param nullsLast - Place null values last; can specify a single boolean applying to all columns or a sequence of booleans for per-column control.
* @param maintainOrder - Whether the order should be maintained if elements are equal.
Expand All @@ -1501,7 +1501,7 @@ export interface DataFrame<T extends Record<string, Series> = any>
maintainOrder,
}: {
by: ColumnsOrExpr;
/** @deprecated *since 0.16.0* @use descending */
/** @deprecated *since 0.16.0* Use {@link descending} instead */
reverse?: boolean; // deprecated
nullsLast?: boolean;
maintainOrder?: boolean;
Expand Down Expand Up @@ -2022,9 +2022,7 @@ function mapPolarsTypeToJSONSchema(colType: DataType): string {
return typeMapping[dataType] || "string";
}

/**
* @ignore
*/
/** @ignore */
export const _DataFrame = (_df: any): DataFrame => {
const unwrap = (method: string, ...args: any[]) => {
return _df[method as any](...args);
Expand Down Expand Up @@ -2536,13 +2534,8 @@ export const _DataFrame = (_df: any): DataFrame => {
toRecords() {
return _df.toObjects();
},
toJSON(...args: any[]) {
// this is passed by `JSON.stringify` when calling `toJSON()`
if (args[0] === "") {
return _df.toJs();
}

return _df.serialize("json").toString();
toJSON() {
return _df.toJson().toString();
Comment on lines +2537 to +2538
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we don't support serialization anymore, I'd rather remove this method, along with the other serialization based ones toObject,

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do support serialization using Ipc format.
Since this is JS, I figured we need Json support.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at a minimum, The toJSON/ JSON.stringify should use a columnar representation, not the row oriented. It also needs to work with JSON.stringify.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toJSON and JSON.stringify(df) produce valid JSON: "[{\"foo\":1.0,\"bar\":\"a\"},{\"foo\":2.0,\"bar\":\"b\"},{\"foo\":3.0,\"bar\":\"c\"}]" which matches df.writeJSON(..)
What would a valid JSON column representation look like?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can share part of my unit tests that has been using the serialize to json. This is part of a REST API where there are results sent to the client using a vector of DataFrames.

Partial output from 0.43.1. DF is 2 columns, tenor:value. Tenor is range(0..=30) as f64, and value is f64 with values ranging between 2.0 and 4.0.

"{curve_values\":[{\"columns\":[{\"datatype\":\"Float64\",\"name\":\"tenor\",\"values\":[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0]},{\"datatype\":\"Float64\",\"name\":\"value\",\"values\":[2.494,2.486,2.479,2.472,2.466,2.467,2.473,2.486,2.518,2.569,2.634,2.714,2.802,2.885,2.957,3.014,3.06,3.094,3.12,3.142,3.166,3.192,3.22,3.247,3.272,3.296,3.321,3.346,3.372,3.397]}]},{\"columns\":[{\"datatype\":\"Float64\",\"name\":\"tenor\",\"values\":[1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0]},{\"datatype\":\"Float64\",\"name\":\"value\",\"values\":[2.585,2.571,2.56,2.55,2.54,2.54,2.546,2.566,2.604,2.65,2.705,2.774,2.852,2.924,2.986,3.038,3.083,3.121,3.152,3.179,3.205,3.231,3.255,3.278,3.301,3.321,3.337,3.352,3.368,3.383]}]}",

The parenthesis/brackets are off because this is just the tail end of the message.

Same code, only changing from 0.43.1 to 0.46.

\"curve_values\":[[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,225,122,20,174,71,225,5,64,57,180,200,118,190,159,5,64,199,75,55,137,65,96,5,64,190,159,26,47,221,36,5,64,225,122,20,174,71,225,4,64,109,231,251,169,241,210,4,64,225,122,20,174,71,225,4,64,150,67,139,108,231,251,4,64,41,92,143,194,245,40,5,64,59,223,79,141,151,110,5,64,152,110,18,131,192,202,5,64,115,104,145,237,124,63,6,64,248,83,227,165,155,196,6,64,231,251,169,241,210,77,7,64,152,110,18,131,192,202,7,64,104,145,237,124,63,53,8,64,240,167,198,75,55,137,8,64,2,43,135,22,217,206,8,64,160,26,47,221,36,6,9,64,51,51,51,51,51,51,9,64,49,8,172,28,90,100,9,64,154,153,153,153,153,153,9,64,109,231,251,169,241,210,9,64,117,147,24,4,86,14,10,64,72,225,122,20,174,71,10,64,166,155,196,32,176,114,10,64,197,32,176,114,104,145,10,64,25,4,86,14,45,178,10,64,55,137,65,96,229,208,10,64,86,14,45,178,157,239,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,92,143,194,245,40,92,5,64,51,51,51,51,51,51,5,64,170,241,210,77,98,16,5,64,139,108,231,251,169,241,4,64,162,69,182,243,253,212,4,64,55,137,65,96,229,208,4,64,215,163,112,61,10,215,4,64,33,176,114,104,145,237,4,64,233,38,49,8,172,28,5,64,49,8,172,28,90,100,5,64,88,57,180,200,118,190,5,64,158,239,167,198,75,55,6,64,98,16,88,57,180,200,6,64,242,210,77,98,16,88,7,64,12,2,43,135,22,217,7,64,72,225,122,20,174,71,8,64,57,180,200,118,190,159,8,64,225,122,20,174,71,225,8,64,20,174,71,225,122,20,9,64,115,104,145,237,124,63,9,64,113,61,10,215,163,112,9,64,164,112,61,10,215,163,9,64,66,96,229,208,34,219,9,64,74,12,2,43,135,22,10,64,231,251,169,241,210,77,10,64,16,88,57,180,200,118,10,64,100,59,223,79,141,151,10,64,184,30,133,235,81,184,10,64,215,163,112,61,10,215,10,64,246,40,92,143,194,245,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,6,129,149,67,139,5,64,242,210,77,98,16,88,5,64,244,253,212,120,233,38,5,64,43,135,22,217,206,247,4,64,2,43,135,22,217,206,4,64,152,110,18,131,192,202,4,64,215,163,112,61,10,215,4,64,139,108,231,251,169,241,4,64,190,159,26,47,221,36,5,64,113,61,10,215,163,112,5,64,55,137,65,96,229,208,5,64,221,36,6,129,149,67,6,64,248,83,227,165,155,196,6,64,125,63,53,94,186,73,7,64,45,178,157,239,167,198,7,64,201,118,190,159,26,47,8,64,186,73,12,2,43,135,8,64,205,204,204,204,204,204,8,64,106,188,116,147,24,4,9,64,254,212,120,233,38,49,9,64,252,169,241,210,77,98,9,64,154,153,153,153,153,153,9,64,55,137,65,96,229,208,9,64,10,215,163,112,61,10,10,64,221,36,6,129,149,67,10,64,113,61,10,215,163,112,10,64,197,32,176,114,104,145,10,64,25,4,86,14,45,178,10,64,109,231,251,169,241,210,10,64,193,202,161,69,182,243,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,223,79,141,151,110,5,64,168,198,75,55,137,65,5,64,180,200,118,190,159,26,5,64,43,135,22,217,206,247,4,64,162,69,182,243,253,212,4,64,55,137,65,96,229,208,4,64,119,190,159,26,47,221,4,64,96,229,208,34,219,249,4,64,244,253,212,120,233,38,5,64,6,129,149,67,139,108,5,64,98,16,88,57,180,200,5,64,115,104,145,237,124,63,6,64,45,178,157,239,167,198,6,64,29,90,100,59,223,79,7,64,2,43,135,22,217,206,7,64,8,172,28,90,100,59,8,64,197,32,176,114,104,145,8,64,162,69,182,243,253,212,8,64,213,120,233,38,49,8,9,64,51,51,51,51,51,51,9,64,252,169,241,210,77,98,9,64,47,221,36,6,129,149,9,64,205,204,204,204,204,204,9,64,213,120,233,38,49,8,10,64,168,198,75,55,137,65,10,64,6,129,149,67,139,108,10,64,90,100,59,223,79,141,10,64,227,165,155,196,32,176,10,64,109,231,251,169,241,210,10,64,139,108,231,251,169,241,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,193,202,161,69,182,243,5,64,25,4,86,14,45,178,5,64,166,155,196,32,176,114,5,64,211,77,98,16,88,57,5,64,0,0,0,0,0,0,5,64,172,28,90,100,59,223,4,64,2,43,135,22,217,206,4,64,12,2,43,135,22,217,4,64,53,94,186,73,12,2,5,64,231,251,169,241,210,77,5,64,141,151,110,18,131,192,5,64,135,22,217,206,247,83,6,64,246,40,92,143,194,245,6,64,197,32,176,114,104,145,7,64,127,106,188,116,147,24,8,64,186,73,12,2,43,135,8,64,162,69,182,243,253,212,8,64,117,147,24,4,86,14,9,64,8,172,28,90,100,59,9,64,252,169,241,210,77,98,9,64,90,100,59,223,79,141,9,64,238,124,63,53,94,186,9,64,182,243,253,212,120,233,9,64,74,12,2,43,135,22,10,64,115,104,145,237,124,63,10,64,252,169,241,210,77,98,10,64,27,47,221,36,6,129,10,64,111,18,131,192,202,161,10,64,195,245,40,92,143,194,10,64,225,122,20,174,71,225,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,157,239,167,198,75,5,64,244,253,212,120,233,38,5,64,10,215,163,112,61,10,5,64,33,176,114,104,145,237,4,64,215,163,112,61,10,215,4,64,215,163,112,61,10,215,4,64,225,122,20,174,71,225,4,64,150,67,139,108,231,251,4,64,41,92,143,194,245,40,5,64,6,129,149,67,139,108,5,64,45,178,157,239,167,198,5,64,8,172,28,90,100,59,6,64,248,83,227,165,155,196,6,64,82,184,30,133,235,81,7,64,55,137,65,96,229,208,7,64,61,10,215,163,112,61,8,64,47,221,36,6,129,149,8,64,12,2,43,135,22,217,8,64,10,215,163,112,61,10,9,64,104,145,237,124,63,53,9,64,102,102,102,102,102,102,9,64,154,153,153,153,153,153,9,64,109,231,251,169,241,210,9,64,63,53,94,186,73,12,10,64,18,131,192,202,161,69,10,64,113,61,10,215,163,112,10,64,197,32,176,114,104,145,10,64,78,98,16,88,57,180,10,64,162,69,182,243,253,212,10,64,246,40,92,143,194,245,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,178,157,239,167,198,75,5,64,41,92,143,194,245,40,5,64,10,215,163,112,61,10,5,64,86,14,45,178,157,239,4,64,215,163,112,61,10,215,4,64,109,231,251,169,241,210,4,64,66,96,229,208,34,219,4,64,139,108,231,251,169,241,4,64,31,133,235,81,184,30,5,64,156,196,32,176,114,104,5,64,248,83,227,165,155,196,5,64,8,172,28,90,100,59,6,64,152,110,18,131,192,202,6,64,39,49,8,172,28,90,7,64,12,2,43,135,22,217,7,64,18,131,192,202,161,69,8,64,207,247,83,227,165,155,8,64,66,96,229,208,34,219,8,64,63,53,94,186,73,12,9,64,158,239,167,198,75,55,9,64,156,196,32,176,114,104,9,64,207,247,83,227,165,155,9,64,109,231,251,169,241,210,9,64,63,53,94,186,73,12,10,64,18,131,192,202,161,69,10,64,113,61,10,215,163,112,10,64,197,32,176,114,104,145,10,64,78,98,16,88,57,180,10,64,162,69,182,243,253,212,10,64,246,40,92,143,194,245,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,129,149,67,139,108,5,64,221,36,6,129,149,67,5,64,84,227,165,155,196,32,5,64,0,0,0,0,0,0,5,64,225,122,20,174,71,225,4,64,66,96,229,208,34,219,4,64,23,217,206,247,83,227,4,64,96,229,208,34,219,249,4,64,190,159,26,47,221,36,5,64,102,102,102,102,102,102,5,64,141,151,110,18,131,192,5,64,8,172,28,90,100,59,6,64,2,43,135,22,217,206,6,64,199,75,55,137,65,96,7,64,76,55,137,65,96,229,7,64,188,116,147,24,4,86,8,64,14,45,178,157,239,167,8,64,23,217,206,247,83,227,8,64,170,241,210,77,98,16,9,64,8,172,28,90,100,59,9,64,6,129,149,67,139,108,9,64,164,112,61,10,215,163,9,64,172,28,90,100,59,223,9,64,180,200,118,190,159,26,10,64,29,90,100,59,223,79,10,64,123,20,174,71,225,122,10,64,154,153,153,153,153,153,10,64,238,124,63,53,94,186,10,64,12,2,43,135,22,217,10,64,246,40,92,143,194,245,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,88,57,180,200,118,5,64,125,63,53,94,186,73,5,64,137,65,96,229,208,34,5,64,203,161,69,182,243,253,4,64,119,190,159,26,47,221,4,64,215,163,112,61,10,215,4,64,119,190,159,26,47,221,4,64,86,14,45,178,157,239,4,64,127,106,188,116,147,24,5,64,39,49,8,172,28,90,5,64,131,192,202,161,69,182,5,64,51,51,51,51,51,51,6,64,45,178,157,239,167,198,6,64,39,49,8,172,28,90,7,64,172,28,90,100,59,223,7,64,29,90,100,59,223,79,8,64,164,112,61,10,215,163,8,64,23,217,206,247,83,227,8,64,20,174,71,225,122,20,9,64,115,104,145,237,124,63,9,64,113,61,10,215,163,112,9,64,164,112,61,10,215,163,9,64,119,190,159,26,47,221,9,64,127,106,188,116,147,24,10,64,231,251,169,241,210,77,10,64,70,182,243,253,212,120,10,64,154,153,153,153,153,153,10,64,238,124,63,53,94,186,10,64,12,2,43,135,22,217,10,64,43,135,22,217,206,247,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0],[255,255,255,255,248,0,0,0,4,0,0,0,242,255,255,255,20,0,0,0,4,0,1,0,0,0,10,0,11,0,8,0,10,0,4,0,242,255,255,255,76,0,0,0,16,0,0,0,0,0,10,0,12,0,0,0,4,0,8,0,1,0,0,0,4,0,0,0,244,255,255,255,28,0,0,0,12,0,0,0,8,0,12,0,4,0,8,0,5,0,0,0,91,48,44,48,93,0,0,0,9,0,0,0,95,80,76,95,70,76,65,71,83,0,0,0,2,0,0,0,72,0,0,0,4,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,118,97,108,117,101,0,0,0,236,255,255,255,48,0,0,0,32,0,0,0,24,0,0,0,1,3,0,0,16,0,18,0,4,0,16,0,17,0,8,0,0,0,12,0,0,0,0,0,250,255,255,255,2,0,6,0,6,0,4,0,5,0,0,0,116,101,110,111,114,0,0,0,255,255,255,255,184,0,0,0,4,0,0,0,236,255,255,255,0,2,0,0,0,0,0,0,20,0,0,0,4,0,3,0,12,0,19,0,16,0,18,0,12,0,4,0,230,255,255,255,30,0,0,0,0,0,0,0,96,0,0,0,20,0,0,0,0,0,0,0,0,0,10,0,20,0,4,0,12,0,16,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,0,64,0,0,0,0,0,0,8,64,0,0,0,0,0,0,16,64,0,0,0,0,0,0,20,64,0,0,0,0,0,0,24,64,0,0,0,0,0,0,28,64,0,0,0,0,0,0,32,64,0,0,0,0,0,0,34,64,0,0,0,0,0,0,36,64,0,0,0,0,0,0,38,64,0,0,0,0,0,0,40,64,0,0,0,0,0,0,42,64,0,0,0,0,0,0,44,64,0,0,0,0,0,0,46,64,0,0,0,0,0,0,48,64,0,0,0,0,0,0,49,64,0,0,0,0,0,0,50,64,0,0,0,0,0,0,51,64,0,0,0,0,0,0,52,64,0,0,0,0,0,0,53,64,0,0,0,0,0,0,54,64,0,0,0,0,0,0,55,64,0,0,0,0,0,0,56,64,0,0,0,0,0,0,57,64,0,0,0,0,0,0,58,64,0,0,0,0,0,0,59,64,0,0,0,0,0,0,60,64,0,0,0,0,0,0,61,64,0,0,0,0,0,0,62,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,20,174,71,225,122,5,64,29,90,100,59,223,79,5,64,94,186,73,12,2,43,5,64,10,215,163,112,61,10,5,64,236,81,184,30,133,235,4,64,225,122,20,174,71,225,4,64,129,149,67,139,108,231,4,64,150,67,139,108,231,251,4,64,147,24,4,86,14,45,5,64,113,61,10,215,163,112,5,64,248,83,227,165,155,196,5,64,211,77,98,16,88,57,6,64,2,43,135,22,217,206,6,64,252,169,241,210,77,98,7,64,23,217,206,247,83,227,7,64,82,184,30,133,235,81,8,64,217,206,247,83,227,165,8,64,23,217,206,247,83,227,8,64,223,79,141,151,110,18,9,64,168,198,75,55,137,65,9,64,219,249,126,106,188,116,9,64,174,71,225,122,20,174,9,64,182,243,253,212,120,233,9,64,84,227,165,155,196,32,10,64,135,22,217,206,247,83,10,64,176,114,104,145,237,124,10,64,154,153,153,153,153,153,10,64,184,30,133,235,81,184,10,64,162,69,182,243,253,212,10,64,193,202,161,69,182,243,10,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0]]}

Changing the output to try to get the actual string out.
Quick bit of code to output a single dataframe of similar type.

            let mut df: DataFrame = df!(
                "tenor" => (0..=30).map(f64::from).collect::<Vec<f64>>(),
                "values" => (0..=30).map(f64::from).collect::<Vec<f64>>(),
            )
            .unwrap();
            let mut json_buffer = std::io::Cursor::new(Vec::<u8>::new());
            let jw = JsonWriter::new(&mut json_buffer).with_json_format(JsonFormat::Json);
            let mut jw = jw.with_json_format(JsonFormat::Json);
            jw.finish(&mut df).unwrap();
            let bar = String::from_utf8(json_buffer.into_inner()).unwrap();

And it's output:

"[{\"tenor\":0.0,\"values\":0.0},{\"tenor\":1.0,\"values\":1.0},{\"tenor\":2.0,\"values\":2.0},{\"tenor\":3.0,\"values\":3.0},{\"tenor\":4.0,\"values\":4.0},{\"tenor\":5.0,\"values\":5.0},{\"tenor\":6.0,\"values\":6.0},{\"tenor\":7.0,\"values\":7.0},{\"tenor\":8.0,\"values\":8.0},{\"tenor\":9.0,\"values\":9.0},{\"tenor\":10.0,\"values\":10.0},{\"tenor\":11.0,\"values\":11.0},{\"tenor\":12.0,\"values\":12.0},{\"tenor\":13.0,\"values\":13.0},{\"tenor\":14.0,\"values\":14.0},{\"tenor\":15.0,\"values\":15.0},{\"tenor\":16.0,\"values\":16.0},{\"tenor\":17.0,\"values\":17.0},{\"tenor\":18.0,\"values\":18.0},{\"tenor\":19.0,\"values\":19.0},{\"tenor\":20.0,\"values\":20.0},{\"tenor\":21.0,\"values\":21.0},{\"tenor\":22.0,\"values\":22.0},{\"tenor\":23.0,\"values\":23.0},{\"tenor\":24.0,\"values\":24.0},{\"tenor\":25.0,\"values\":25.0},{\"tenor\":26.0,\"values\":26.0},{\"tenor\":27.0,\"values\":27.0},{\"tenor\":28.0,\"values\":28.0},{\"tenor\":29.0,\"values\":29.0},{\"tenor\":30.0,\"values\":30.0}]"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A workaround we've done for this one part of our codebase is to isolate the part that reads dataframes and sends to our customer from the other parts of the system, and then keep it on 0.43.1 allowing the rest of the system to advance to 0.46. While writing a macro to generate the old output is straight forward, all the unit tests require that the returned output be able to be deserialized to it's original format.

},
toHTML(): string {
let htmlTable = "<table>";
Expand Down
10 changes: 4 additions & 6 deletions polars/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,8 @@ export namespace pl {
/**
* Run SQL queries against DataFrame/LazyFrame data.
*
* @warning This functionality is considered **unstable**, although it is close to being
* considered stable. It may be changed at any point without it being considered
* a breaking change.
* @experimental This functionality is considered **unstable**, although it is close to being
* considered stable. It may be changed at any point without it being considered a breaking change.
*/
export function SQLContext(
frames?: Record<string, DataFrame | LazyDataFrame>,
Expand Down Expand Up @@ -290,9 +289,8 @@ export const Decimal = DataType.Decimal;
/**
* Run SQL queries against DataFrame/LazyFrame data.
*
* @warning This functionality is considered **unstable**, although it is close to being
* considered stable. It may be changed at any point without it being considered
* a breaking change.
* @experimental This functionality is considered **unstable**, although it is close to being
* considered stable. It may be changed at any point without it being considered a breaking change.
*/
export function SQLContext(
frames?: Record<string, DataFrame | LazyDataFrame>,
Expand Down
13 changes: 3 additions & 10 deletions polars/lazy/expr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ export interface Expr
argMin(): Expr;
/**
* Get the index values that would sort this column.
* @deprecated *since 0.16.0* @use descending
* @param reverse - Reverse/descending sort.
* @param descending
* - false -> order from small to large.
* - true -> order from large to small.
Expand Down Expand Up @@ -738,8 +736,8 @@ export interface Expr
quantile(quantile: number | Expr): Expr;
/**
* Assign ranks to data, dealing with ties appropriately.
* @param - method : {'average', 'min', 'max', 'dense', 'ordinal', 'random'}
* @param - descending - Rank in descending order.
* @param method : {'average', 'min', 'max', 'dense', 'ordinal', 'random'}
* @param descending - Rank in descending order.
* */
rank(method?: RankMethod, descending?: boolean): Expr;
rank({ method, descending }: { method: string; descending: boolean }): Expr;
Expand Down Expand Up @@ -1040,8 +1038,6 @@ export interface Expr
}: { offset: number | Expr; length: number | Expr }): Expr;
/**
* Sort this column. In projection/ selection context the whole column is sorted.
* @deprecated *since 0.16.0* @use descending
* @param reverse - Reverse/descending sort.
* @param descending
* * false -> order from small to large.
* * true -> order from large to small.
Expand All @@ -1064,8 +1060,6 @@ export interface Expr
Parameters
----------
@param by The column(s) used for sorting.
@deprecated *since 0.16.0* @use descending
@param reverse - Reverse/descending sort.
@param descending
false -> order from small to large.
true -> order from large to small.
Expand All @@ -1088,7 +1082,6 @@ export interface Expr
suffix(suffix: string): Expr;
/**
* Get sum value.
* @note
* Dtypes in {Int8, UInt8, Int16, UInt16} are cast to Int64 before summing to prevent overflow issues.
*/
sum(): Expr;
Expand Down Expand Up @@ -1144,7 +1137,7 @@ export interface Expr
/** Alias for filter: @see {@link filter} */
where(predicate: Expr): Expr;
}

/** @ignore */
export const _Expr = (_expr: any): Expr => {
const unwrap = (method: string, ...args: any[]) => {
return _expr[method as any](...args);
Expand Down
5 changes: 2 additions & 3 deletions polars/lazy/expr/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export interface StringNamespace extends StringFunctions<Expr> {
/**
* Parse string values as JSON.
* Throw errors if encounter invalid JSON strings.
* @params Not implemented ATM
* @returns DF with struct
* @example

Expand Down Expand Up @@ -184,7 +183,7 @@ export interface StringNamespace extends StringFunctions<Expr> {
* If string is longer or equal to given length no modifications will be done
* @param {number} length - of the final string
* @param {string} fillChar - that will fill the string.
* @note If a string longer than 1 character is provided only the first character will be used
* If a string longer than 1 character is provided only the first character will be used
* @example
* ```
* > df = pl.DataFrame({
Expand Down Expand Up @@ -249,7 +248,7 @@ export interface StringNamespace extends StringFunctions<Expr> {
* If string is longer or equal to given length no modifications will be done
* @param {number} length - of the final string
* @param {string} fillChar - that will fill the string.
* @note If a string longer than 1 character is provided only the first character will be used
* If a string longer than 1 character is provided only the first character will be used
* * @example
* ```
* > df = pl.DataFrame({
Expand Down
Loading