Skip to content

Commit

Permalink
arrowFieldTypeIsEqual didn't work for FixedSizeBinary
Browse files Browse the repository at this point in the history
issue reported at #825
  • Loading branch information
kaigai committed Oct 15, 2024
1 parent cb2c4e7 commit 9d2df1d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/arrow_nodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 9d2df1d

Please sign in to comment.