@dsnp/parquetjs
Advanced tools
Comparing version 1.3.4 to 1.3.5
@@ -11,3 +11,3 @@ import sbbf from "../bloom/sbbf"; | ||
export declare const siftAllByteOffsets: (columnChunkDataCollection: Array<ColumnChunkData>) => Array<bloomFilterOffsetData>; | ||
export declare const getBloomFiltersFor: (columnNames: Array<string>, envelopeReader: InstanceType<typeof ParquetEnvelopeReader>) => Promise<{ | ||
export declare const getBloomFiltersFor: (paths: Array<string>, envelopeReader: InstanceType<typeof ParquetEnvelopeReader>) => Promise<{ | ||
sbbf: sbbf; | ||
@@ -14,0 +14,0 @@ columnName: string; |
@@ -97,4 +97,4 @@ "use strict"; | ||
exports.siftAllByteOffsets = siftAllByteOffsets; | ||
const getBloomFiltersFor = async (columnNames, envelopeReader) => { | ||
const columnChunkDataCollection = envelopeReader.getAllColumnChunkDataFor(columnNames); | ||
const getBloomFiltersFor = async (paths, envelopeReader) => { | ||
const columnChunkDataCollection = envelopeReader.getAllColumnChunkDataFor(paths); | ||
const bloomFilterOffsetData = (0, exports.siftAllByteOffsets)(columnChunkDataCollection); | ||
@@ -101,0 +101,0 @@ const offsetByteValues = bloomFilterOffsetData.map(({ offsetBytes }) => offsetBytes); |
@@ -247,6 +247,10 @@ "use strict"; | ||
group.columns.forEach(column => { | ||
const columnName = column.meta_data?.path_in_schema[0]; | ||
if (!columnName || columnName in this.bloomFilters === false) | ||
if (!column.meta_data?.path_in_schema.length) { | ||
return; | ||
const serializedBloomFilterData = bloomFilterWriter.getSerializedBloomFilterData(this.bloomFilters[columnName]); | ||
} | ||
const filterName = column.meta_data?.path_in_schema.join(','); | ||
if (!(filterName in this.bloomFilters)) { | ||
return; | ||
} | ||
const serializedBloomFilterData = bloomFilterWriter.getSerializedBloomFilterData(this.bloomFilters[filterName]); | ||
bloomFilterWriter.setFilterOffset(column, this.offset); | ||
@@ -317,3 +321,4 @@ this.writeSection(serializedBloomFilterData); | ||
})(this); | ||
this.writer = new ParquetWriter(schema, new ParquetEnvelopeWriter(schema, writeProxy, function () { }, new node_int64_1.default(0), opts), opts); | ||
this.writer = new ParquetWriter(schema, new ParquetEnvelopeWriter(schema, writeProxy, function () { | ||
}, new node_int64_1.default(0), opts), opts); | ||
} | ||
@@ -376,5 +381,6 @@ _transform(row, _encoding, callback) { | ||
let page; | ||
const values = rowBuffer.columnData[field.path.join(',')]; | ||
if (opts.bloomFilters && (field.name in opts.bloomFilters)) { | ||
const splitBlockBloomFilter = opts.bloomFilters[field.name]; | ||
const columnPath = field.path.join(','); | ||
const values = rowBuffer.columnData[columnPath]; | ||
if (opts.bloomFilters && (columnPath in opts.bloomFilters)) { | ||
const splitBlockBloomFilter = opts.bloomFilters[columnPath]; | ||
values.values.forEach(v => splitBlockBloomFilter.insert(v)); | ||
@@ -381,0 +387,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"types": "dist/parquet.d.ts", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"homepage": "https://github.com/LibertyDSNP/parquetjs", | ||
@@ -34,7 +34,6 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@types/bson": "^4.2.0", | ||
"@types/chai": "^4.3.5", | ||
"@types/json-schema": "^7.0.11", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^16.18.32", | ||
"@types/node": "^18.18.2", | ||
"@types/sinon": "^10.0.15", | ||
@@ -85,3 +84,3 @@ "@types/varint": "^6.0.1", | ||
"engines": { | ||
"node": ">=16.15.1" | ||
"node": ">=18.18.2" | ||
}, | ||
@@ -88,0 +87,0 @@ "files": [ |
@@ -24,3 +24,3 @@ # parquet.js | ||
## Installation | ||
_parquet.js requires node.js >= 14.16.0_ | ||
_parquet.js requires node.js >= 18.18.2_ | ||
@@ -27,0 +27,0 @@ ``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2754446
23
19478
22