forked from ZJONSSON/parquetjs
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs and add simple test for readme encoding examples (#107)
Problem ======= Docs were wrong from a long time ago per ironSource#100 Solution ======== Updated the docs and added a simple test Closes #106
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { expect } from "chai"; | ||
|
||
import { ParquetSchema } from '../parquet'; | ||
|
||
describe("Readme Encoding Examples", function () { | ||
it("PLAIN should work", function () { | ||
const ps = new ParquetSchema({ | ||
name: { type: 'UTF8', encoding: 'PLAIN' }, | ||
}); | ||
expect(ps).to.be.a("object"); | ||
expect(ps.schema.name.encoding).to.eq("PLAIN"); | ||
}); | ||
|
||
it("RLE should work", function () { | ||
const ps = new ParquetSchema({ | ||
age: { type: 'UINT_32', encoding: 'RLE', typeLength: 7 }, | ||
}); | ||
expect(ps).to.be.a("object"); | ||
expect(ps.schema.age.typeLength).to.eq(7); | ||
}); | ||
}); |