clintropolis commented on a change in pull request #10613:
URL: https://github.com/apache/druid/pull/10613#discussion_r584199144



##########
File path: 
processing/src/main/java/org/apache/druid/query/dimension/DimensionSpec.java
##########
@@ -70,6 +71,11 @@ default MultiValueDimensionVectorSelector 
decorate(MultiValueDimensionVectorSele
     throw new UOE("DimensionSpec[%s] cannot vectorize", getClass().getName());
   }
 
+  default VectorObjectSelector decorate(VectorObjectSelector selector)

Review comment:
       I haven't yet implemented support for multi-value string object 
selectors, but your question also seems applicable if we were to add array 
types too. I guess the contents of the array would be dependent on whatever the 
underlying selector is providing, and it would be the responsibility of the 
`DimensionSpec` implementation to handle decoration appropriately? I guess we 
should also probably consider adding methods for the primitive numeric columns 
as well, since they are not masqueraded as "dimension selectors" in the 
vectorized engine, (if we ever want to fully support all of the non-vectorized 
behavior here I think).
   
   I don't know, the more I think about this, do we really need 
`DimensionSpec`, like at all? The stuff it does is all over the place, and it 
feels like maybe this type of stuff should just be pushed down into either 
expression virtual columns or something more specialized as appropriate (more 
generic predicate filtered selectors virtual column?). Then we maybe we can 
just ditch this stuff entirely in some sunny future instead of implementing 
vectorized versions of decorate for the various `DimensionSpec` 
implementations. Or is there an advantage to `DimensionSpec` that I am missing?




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to