code: @Nullable
    public VirtualColumn getOrCreateVirtualColumnForExpression(
        PlannerContext plannerContext,
        DruidExpression expression,
        SqlTypeName typeName
    )
    {
      if (!isAggregateSignature && !virtualColumnsByExpression.containsKey(expression.getExpression())) {
        final String virtualColumnName = virtualColumnPrefix + virtualColumnCounter++;
        final VirtualColumn virtualColumn = expression.toVirtualColumn(
            virtualColumnName,
            Calcites.getValueTypeForSqlTypeName(typeName),
            plannerContext.getExprMacroTable()
        );
        virtualColumnsByExpression.put(
            expression.getExpression(),
            virtualColumn
        );
        virtualColumnsByName.put(
            virtualColumnName,
            virtualColumn
        );
      }
  
      return virtualColumnsByExpression.get(expression.getExpression());
    }
docs: Get existing or create new (if not {@link DruidQuerySignature#isAggregateSignature}) {@link VirtualColumn} for a given
  {@link DruidExpression}