protected override Expression VisitColumn(ColumnExpression column) { ParameterExpression fieldReader; int index; if (this.scope != null && this.scope.TryGetValue(column, out fieldReader, out index)) { MethodInfo method = FieldReader.GetReaderMethod(column.Type); columnTypes[index] = column.Type; return(Expression.Call(fieldReader, method, Expression.Constant(index))); } else { System.Diagnostics.Debug.Fail(string.Format("column not in scope: {0}", column)); } return(column); }