0lai0 opened a new issue, #4433:
URL: https://github.com/apache/datafusion-comet/issues/4433
## Summary
Follow-up to #4364.
`CometPlainVector` currently uses a growing list of boolean fields to
dispatch on vector type:
```java
private final boolean isBaseFixedWidthVector;
// (and now implicitly: offsetBufferAddress != -1 as a sentinel for
variable-width)
```
As noted by @mbutrovich in the PR review, this pattern doesn't scale well.
An enum would make the dispatch explicit and extensible.
## Proposed change
Introduce a small `VectorKind` (or similar) enum, e.g.:
```java
private enum VectorKind {
FIXED_WIDTH,
VARIABLE_WIDTH,
// future kinds...
}
private final VectorKind vectorKind;
```
Replace the boolean flag and the `offsetBufferAddress != -1` sentinel with
`vectorKind` checks throughout `CometPlainVector`.
## References
- PR #4364 (comment):
https://github.com/apache/datafusion-comet/pull/4364#discussion_r2104...
- Suggested by @mbutrovich, deferred as a follow-up
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]