What are 'virtual columns'?

I see them used in the ‘explain plan’ for sql queries.
But there is no documentation whatsoever for what they are…

Hi Prashant,

virtualColumn can be thought as a transform layer located between the raw data and the query result. Druid is mostly using it for Druid’s expression system (see ExpressionVirtualColumn and https://github.com/druid-io/druid/blob/master/docs/content/misc/math-expr.md). Also there is another virtualColumn type, called ‘map’ virtualColumn.

The virtualColumn was not documented because it was an experimental feature and not stable yet, but I think it’s time to add documents for it.


BTW, I strongly feel that we should document for experimental features as well, because it’s really hard to test even for developers.