ihuzenko commented on a change in pull request #1829: DRILL-7096: Develop
vector for canonical Map<K,V>
URL: https://github.com/apache/drill/pull/1829#discussion_r319922866
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/record/TypedFieldId.java
##########
@@ -149,16 +156,44 @@ public static Builder newBuilder() {
return new Builder();
}
- public static class Builder{
+ public static class Builder {
final IntArrayList ids = new IntArrayList();
MajorType finalType;
MajorType intermediateType;
MajorType secondaryFinal;
PathSegment remainder;
- boolean hyperReader = false;
- boolean withIndex = false;
- boolean isListVector = false;
- Map<Integer, MajorType> types = new HashMap<>();
+ boolean hyperReader;
+ boolean withIndex;
+ boolean isListVector;
+ BitSet dictBitSet = new BitSet();
+
+ public static TypedFieldId build(MajorType type, int... fieldIds) {
+ return new Builder().intermediateType(type)
+ .finalType(type)
+ .secondaryFinal(type)
+ .addIds(fieldIds)
+ .build();
+ }
+
+ public static TypedFieldId build(MajorType type, IntArrayList breadCrumb,
PathSegment remainder) {
+ return new Builder().intermediateType(type)
+ .finalType(type)
+ .secondaryFinal(type)
+ .remainder(remainder)
+ .addIds(breadCrumb.toArray())
+ .build();
+ }
+
+ public static TypedFieldId build(MajorType type, boolean isHyper, int...
fieldIds) {
+ Builder builder = new Builder().intermediateType(type)
+ .finalType(type)
+ .secondaryFinal(type)
+ .addIds(fieldIds);
+ if (isHyper) {
+ builder.hyper();
Review comment:
The ```hyper()``` could simply accept boolean.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services