lidavidm commented on code in PR #892:
URL: https://github.com/apache/arrow-java/pull/892#discussion_r2533879496
##########
vector/src/main/codegen/templates/PromotableWriter.java:
##########
@@ -540,18 +543,25 @@ public void writeLargeVarChar(String value) {
getWriter(MinorType.LARGEVARCHAR).writeLargeVarChar(value);
}
+ protected ArrowType lastExtensionType;
+
@Override
public void writeExtension(Object value) {
Review Comment:
It does make for a very confusing API; there have been other issues/PRs
filed about similar cases. At the very least this must detect and throw an
explanatory exception for this case.
Also, it would be good to have an override that lets you supply the
extension type so that there's no ambiguity or potential for hard-to-diagnose
runtime issues (what if a refactoring in some other part of the code eliminates
the getWriter call and now your code is suddenly throwing?). Other types (like
decimal) have overrides that let you supply the type, so I think this should
too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]