You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2026/07/22 09:05:39 UTC
[I] [C++] AppendScalar implementation uses polymorphism [arrow]
pitrou opened a new issue, #50596:
URL: https://github.com/apache/arrow/issues/50596
### Describe the enhancement requested
The `ArrayBuilder::AppendScalar` implementation is currently very odd:
* the `ArrayBuilder` hierarchy uses polymorphism (i.e. virtual methods) to handle type-specific operations
* but `ArrayBuilder::AppendScalar` is implemented entirely in the base class using a visitor, putting type-specific knowledge in the base class definition
* but `ArrayBuilder::AppendScalar` is *also* a virtual method overriden in dictionary and run-end-encoded builders
* furthermore, the visitor in the base class definition of `ArrayBuilder::AppendScalar` dispatched on the scalar's data type, instead of the builder's data type
We should refactor the `AppendScalar` implementation to be entirely polymorphic and remove any trace of type-specific implementations in the base class (`ArrayBuilder::AppendScalar` would probably become a pure virtual method).
This would also help in cases like https://github.com/apache/arrow/pull/50584
### Component(s)
C++
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++] AppendScalar implementation uses polymorphism [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #50596:
URL: https://github.com/apache/arrow/issues/50596#issuecomment-5047969596
@SHAURYASAXENA2024 I think you haven't contributed before? This issue is probably too complex, please look for issues with the "good first issue" label.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++] AppendScalar implementation uses polymorphism [arrow]
Posted by "SHAURYASAXENA2024 (via GitHub)" <gi...@apache.org>.
SHAURYASAXENA2024 commented on issue #50596:
URL: https://github.com/apache/arrow/issues/50596#issuecomment-5047833229
Hi! I'd like to work on this issue if it's still available. Please let me know if someone is already working on it.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++] AppendScalar implementation uses polymorphism [arrow]
Posted by "VedantRalekar (via GitHub)" <gi...@apache.org>.
VedantRalekar commented on issue #50596:
URL: https://github.com/apache/arrow/issues/50596#issuecomment-5297661140
Hi, anyone working on this issue ?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [C++] AppendScalar implementation uses polymorphism [arrow]
Posted by "SHAURYASAXENA2024 (via GitHub)" <gi...@apache.org>.
SHAURYASAXENA2024 commented on issue #50596:
URL: https://github.com/apache/arrow/issues/50596#issuecomment-5048494420
Thank you very much for your advice! Yes, you are correct, this is my first time contributing to Apache Arrow. First, I will become acquainted with the code base and the contribution process.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org