Skip to content

Commit

Permalink
return null when timestamp value is null instead of epoch default ts (d…
Browse files Browse the repository at this point in the history
…atabricks#151)

* return null when timestamp value is null instead of epoch default ts

* Preserve null values when parsing arrow data

Signed-off-by: Levko Kravets <[email protected]>

---------

Signed-off-by: Levko Kravets <[email protected]>

Co-authored-by: Levko Kravets <[email protected]>
Signed-off-by: nithinkdb <[email protected]>
  • Loading branch information
2 people authored and nithinkdb committed Aug 21, 2023
1 parent 316e4b2 commit 637b3bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/result/ArrowResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export default class ArrowResult implements IOperationResult {
}

private convertArrowTypes(value: any, valueType: DataType | undefined, fields: Array<ArrowSchemaField> = []): any {
if (value === null) {
return value;
}

const fieldsMap: Record<string, ArrowSchemaField> = {};
for (const field of fields) {
fieldsMap[field.name] = field;
Expand Down

0 comments on commit 637b3bf

Please sign in to comment.