From 637b3bff76c3c207d49d0c220f4b8ee30accc615 Mon Sep 17 00:00:00 2001 From: ivan-parada <108550001+ivan-parada@users.noreply.github.com> Date: Wed, 26 Jul 2023 03:41:23 -0600 Subject: [PATCH] return null when timestamp value is null instead of epoch default ts (#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 --------- Signed-off-by: Levko Kravets Co-authored-by: Levko Kravets Signed-off-by: nithinkdb --- lib/result/ArrowResult.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/result/ArrowResult.ts b/lib/result/ArrowResult.ts index 5bf59ec4..1f497226 100644 --- a/lib/result/ArrowResult.ts +++ b/lib/result/ArrowResult.ts @@ -68,6 +68,10 @@ export default class ArrowResult implements IOperationResult { } private convertArrowTypes(value: any, valueType: DataType | undefined, fields: Array = []): any { + if (value === null) { + return value; + } + const fieldsMap: Record = {}; for (const field of fields) { fieldsMap[field.name] = field;