/// <summary>
            ///     Find all vars that were referenced in the column map. Looks for VarRefColumnMap
            ///     in the ColumnMap tree, and tracks those vars
            ///     NOTE: The "vec" parameter must be supplied by the caller. The caller is responsible for
            ///     clearing out this parameter (if necessary) before calling into this function
            /// </summary>
            /// <param name="columnMap"> the column map to traverse </param>
            /// <param name="vec"> the set of referenced columns </param>
            internal static void FindVars(ColumnMap columnMap, VarVec vec)
            {
                var tracker = new ColumnMapVarTracker();

                columnMap.Accept(tracker, vec);
                return;
            }
Example #2
0
        // <summary>
        // Returns a string uniquely identifying the given ColumnMap.
        // </summary>
        internal static string GetColumnMapKey(ColumnMap columnMap, SpanIndex spanIndex)
        {
            var builder = new ColumnMapKeyBuilder(spanIndex);

            columnMap.Accept(builder, 0);
            return(builder._builder.ToString());
        }
 private void Append(string prefix, ColumnMap columnMap)
 {
     this.Append(prefix);
     this.Append("[");
     columnMap?.Accept <int>((ColumnMapVisitor <int>) this, 0);
     this.Append("]");
 }
        internal static string GetColumnMapKey(ColumnMap columnMap, SpanIndex spanIndex)
        {
            ColumnMapKeyBuilder columnMapKeyBuilder = new ColumnMapKeyBuilder(spanIndex);

            columnMap.Accept <int>((ColumnMapVisitor <int>)columnMapKeyBuilder, 0);
            return(columnMapKeyBuilder._builder.ToString());
        }
Example #5
0
 private void Append(string prefix, ColumnMap columnMap)
 {
     Append(prefix);
     Append("[");
     if (null != columnMap)
     {
         columnMap.Accept(this, 0);
     }
     Append("]");
 }
Example #6
0
        internal virtual void Visit(ComplexTypeColumnMap columnMap, TArgType arg)
        {
            ColumnMap nullSentinel = columnMap.NullSentinel;

            if (null != nullSentinel)
            {
                nullSentinel.Accept(this, arg);
            }
            foreach (var p in columnMap.Properties)
            {
                p.Accept(this, arg);
            }
        }
Example #7
0
 internal static void FindVars(ColumnMap columnMap, VarVec vec)
 {
     ProjectionPruner.ColumnMapVarTracker columnMapVarTracker = new ProjectionPruner.ColumnMapVarTracker();
     columnMap.Accept <VarVec>((ColumnMapVisitor <VarVec>)columnMapVarTracker, vec);
 }