From 9d2df1d33422aa8076e01f81f91659badca86b61 Mon Sep 17 00:00:00 2001 From: KaiGai Kohei Date: Wed, 16 Oct 2024 00:25:05 +0900 Subject: [PATCH] arrowFieldTypeIsEqual didn't work for FixedSizeBinary issue reported at #825 --- src/arrow_nodes.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/arrow_nodes.c b/src/arrow_nodes.c index 5bee69e8a..1347082b0 100644 --- a/src/arrow_nodes.c +++ b/src/arrow_nodes.c @@ -1032,9 +1032,17 @@ __arrowFieldTypeIsEqual(ArrowField *a, ArrowField *b, int depth) return false; } break; + case ArrowNodeTag__Bool: case ArrowNodeTag__Utf8: case ArrowNodeTag__Binary: - case ArrowNodeTag__Bool: + case ArrowNodeTag__LargeUtf8: + case ArrowNodeTag__LargeBinary: + break; + + case ArrowNodeTag__FixedSizeBinary: + if (a->type.FixedSizeBinary.byteWidth != + b->type.FixedSizeBinary.byteWidth) + return false; break; case ArrowNodeTag__Decimal: @@ -1082,6 +1090,7 @@ __arrowFieldTypeIsEqual(ArrowField *a, ArrowField *b, int depth) break; case ArrowNodeTag__List: + case ArrowNodeTag__LargeList: if (depth > 0) Elog("arrow_fdw: nested array types are not supported"); if (a->_num_children != 1 || b->_num_children != 1) @@ -1094,7 +1103,7 @@ __arrowFieldTypeIsEqual(ArrowField *a, ArrowField *b, int depth) default: Elog("'%s' of arrow type is not supported", - a->node.tagName); + a->type.node.tagName); } return true; }