Class FallbackVirtualColumn

java.lang.Object
org.apache.druid.segment.virtual.FallbackVirtualColumn
All Implemented Interfaces:
Cacheable, VirtualColumn

public class FallbackVirtualColumn extends Object implements VirtualColumn
A virtual column that picks one column or another based on whether they exist. It walks through an array of DimensionSpecs finding and using the first column that actually exists. If it believes that none of them exist it YOLOs it with the first entry from the list.

If you are using this virtual column and want to have a decorator/extraction function on your DimensionSpec, it is expected that you will put it on the specs in the list rather than on the spec that references this virtual column. That is, when this virtual column resolves a dimension, it ignores the decoration from the spec that it was given and instead uses the spec as defined in the list as-is to delegate to the column that it chose.