602 references to OpType
System.Data.Entity (602)
System\Data\Mapping\FunctionImportMappingComposable.cs (1)
110PlanCompiler.Assert(rootProject.Op.OpType == OpType.PhysicalProject, "Expected a physical projectOp at the root of the tree - found " + rootProject.Op.OpType);
System\Data\Mapping\ViewGeneration\GeneratedView.cs (1)
215PlanCompiler.Assert(itree.Root.Op.OpType == OpType.PhysicalProject,
System\Data\Query\InternalTrees\AncillaryOps.cs (2)
31private VarDefOp() : base(OpType.VarDef) { } 72private VarDefListOp() : base(OpType.VarDefList) { }
System\Data\Query\InternalTrees\Command.cs (4)
762internal ComparisonOp CreateComparisonOp(OpType opType) 781internal ConditionalOp CreateConditionalOp(OpType opType) 907internal ArithmeticOp CreateArithmeticOp(OpType opType, TypeUsage type) 1772internal Node BuildComparison(OpType opType, Node arg0, Node arg1)
System\Data\Query\InternalTrees\Dump.cs (74)
462if (OpType.UnionAll == op.OpType) { 859internal static string ToString(OpType op) 863case OpType.Aggregate: 865case OpType.And: 867case OpType.Case: 869case OpType.Cast: 871case OpType.Collect: 873case OpType.Constant: 875case OpType.ConstantPredicate: 877case OpType.CrossApply: 879case OpType.CrossJoin: 881case OpType.Deref: 883case OpType.Distinct: 885case OpType.Divide: 887case OpType.Element: 889case OpType.EQ: 891case OpType.Except: 893case OpType.Exists: 895case OpType.Filter: 897case OpType.FullOuterJoin: 899case OpType.Function: 901case OpType.GE: 903case OpType.GetEntityRef: 905case OpType.GetRefKey: 907case OpType.GroupBy: 909case OpType.GroupByInto: 911case OpType.GT: 913case OpType.InnerJoin: 915case OpType.InternalConstant: 917case OpType.Intersect: 919case OpType.IsNull: 921case OpType.IsOf: 923case OpType.LE: 925case OpType.Leaf: 927case OpType.LeftOuterJoin: 929case OpType.Like: 931case OpType.LT: 933case OpType.Minus: 935case OpType.Modulo: 937case OpType.Multiply: 939case OpType.MultiStreamNest: 941case OpType.Navigate: 943case OpType.NE: 945case OpType.NewEntity: 947case OpType.NewInstance: 949case OpType.DiscriminatedNewEntity: 951case OpType.NewMultiset: 953case OpType.NewRecord: 955case OpType.Not: 957case OpType.Null: 959case OpType.NullSentinel: 961case OpType.Or: 963case OpType.OuterApply: 965case OpType.PhysicalProject: 967case OpType.Plus: 969case OpType.Project: 971case OpType.Property: 973case OpType.Ref: 975case OpType.RelProperty: 977case OpType.ScanTable: 979case OpType.ScanView: 981case OpType.SingleRow: 983case OpType.SingleRowTable: 985case OpType.SingleStreamNest: 987case OpType.SoftCast: 989case OpType.Sort: 991case OpType.Treat: 993case OpType.UnaryMinus: 995case OpType.UnionAll: 997case OpType.Unnest: 999case OpType.VarDef: 1001case OpType.VarDefList: 1003case OpType.VarRef: 1005case OpType.ConstrainedSort:
System\Data\Query\InternalTrees\NodeInfo.cs (24)
431return (definition.Op.OpType == OpType.Constant 432|| definition.Op.OpType == OpType.InternalConstant 433|| definition.Op.OpType == OpType.NullSentinel 434|| definition.Op.OpType == OpType.VarRef 526if (n.Child0.Op.OpType == OpType.VarDef && n.Child0.Child0.Op.OpType == OpType.Function && op.Table.Keys.Count > 0) 564Debug.Assert(varDefListNode.Op.OpType == OpType.VarDefList); 860if (!(op.OpType == OpType.InnerJoin || 861op.OpType == OpType.LeftOuterJoin || 862op.OpType == OpType.FullOuterJoin)) 889if (op.OpType == OpType.InnerJoin || op.OpType == OpType.LeftOuterJoin) 893if (op.OpType == OpType.InnerJoin) 902if (op.OpType == OpType.FullOuterJoin) 919if (op.OpType == OpType.LeftOuterJoin) 971if (op.OpType == OpType.CrossApply) 988RowCount minRows = (op.OpType == OpType.CrossApply) ? RowCount.Zero : leftRelOpNodeInfo.MinRows; 1029if (op.OpType == OpType.UnionAll) 1035if (op.OpType == OpType.Intersect || op.OpType == OpType.Except) 1098if (op.OpType != OpType.Except) 1101if (op.OpType == OpType.Intersect) 1156if (OpType.ConstrainedSort == op.OpType && 1157OpType.Constant == n.Child2.Op.OpType &&
System\Data\Query\InternalTrees\OpCopier.cs (3)
936case OpType.UnionAll: 947case OpType.Intersect: 953case OpType.Except:
System\Data\Query\InternalTrees\Ops.cs (9)
400private OpType m_opType; 407internal Op(OpType opType) 422internal OpType OpType { get { return m_opType; } } 514internal ScalarOp(OpType opType, TypeUsage type) 521protected ScalarOp(OpType opType) : base(opType) { } 571internal RelOp(OpType opType) : base(opType) { } 592internal AncillaryOp(OpType opType) : base(opType) { } 613internal PhysicalOp(OpType opType) : base(opType) { } 634internal RulePatternOp(OpType opType) : base(opType) { }
System\Data\Query\InternalTrees\PhysicalOps.cs (4)
82: base(OpType.PhysicalProject) 208internal NestBaseOp(OpType opType, List<SortKey> prefixSortKeys, 290: base(OpType.SingleStreamNest, prefixSortKeys, outputVars, collectionInfoList) 333: base(OpType.MultiStreamNest, prefixSortKeys, outputVars, collectionInfoList)
System\Data\Query\InternalTrees\RelOps.cs (44)
26protected ScanTableBaseOp(OpType opType, Table table) 31protected ScanTableBaseOp(OpType opType) 55: base(OpType.ScanTable, table) 59private ScanTableOp() : base(OpType.ScanTable) { } 103: base(OpType.ScanView, table) 106private ScanViewOp() : base(OpType.ScanView) { } 156: base(OpType.Unnest) 204internal JoinBaseOp(OpType opType) : base(opType) { } 221private CrossJoinOp() : base(OpType.CrossJoin) { } 261private InnerJoinOp() : base(OpType.InnerJoin) { } 293private LeftOuterJoinOp() : base(OpType.LeftOuterJoin) { } 325private FullOuterJoinOp() : base(OpType.FullOuterJoin) { } 357internal ApplyBaseOp(OpType opType) : base(opType) { } 374private CrossApplyOp() : base(OpType.CrossApply) { } 406private OuterApplyOp() : base(OpType.OuterApply) { } 438private FilterOp() : base(OpType.Filter) { } 480: base(OpType.Project) 575internal SortBaseOp(OpType opType) 578Debug.Assert(opType == OpType.Sort || opType == OpType.ConstrainedSort, "SortBaseOp OpType must be Sort or ConstrainedSort"); 581internal SortBaseOp(OpType opType, List<SortKey> sortKeys) 601private SortOp() : base(OpType.Sort) { } 603internal SortOp(List<SortKey> sortKeys) : base(OpType.Sort, sortKeys) {} 644private ConstrainedSortOp() : base(OpType.ConstrainedSort) { } 647: base(OpType.ConstrainedSort, sortKeys) 693protected GroupByBaseOp(OpType opType) : base(opType) 695Debug.Assert(opType == OpType.GroupBy || opType == OpType.GroupByInto, "GroupByBaseOp OpType must be GroupBy or GroupByInto"); 697internal GroupByBaseOp(OpType opType, VarVec keys, VarVec outputs) 741private GroupByOp() : base(OpType.GroupBy) { } 743: base(OpType.GroupBy, keys, outputs) 785private GroupByIntoOp() : base(OpType.GroupByInto) { } 787: base(OpType.GroupByInto, keys, outputs) 836internal SetOp(OpType opType, VarVec outputs, VarMap left, VarMap right) 844protected SetOp(OpType opType) : base(opType) 878private UnionAllOp() : base(OpType.UnionAll) { } 880internal UnionAllOp(VarVec outputs, VarMap left, VarMap right, Var branchDiscriminator) : base(OpType.UnionAll, outputs, left, right) 920private IntersectOp() : base(OpType.Intersect) { } 921internal IntersectOp(VarVec outputs, VarMap left, VarMap right) : base(OpType.Intersect, outputs, left,right) { } 952private ExceptOp() : base(OpType.Except) { } 953internal ExceptOp(VarVec outputs, VarMap left, VarMap right) : base(OpType.Except, outputs, left, right) { } 988private DistinctOp() : base(OpType.Distinct) 1040private SingleRowOp() : base(OpType.SingleRow) { } 1084private SingleRowTableOp() : base(OpType.SingleRowTable) { }
System\Data\Query\InternalTrees\Rule.cs (7)
39private OpType m_opType; 48protected Rule(OpType opType, ProcessNodeDelegate nodeProcessDelegate) 51Debug.Assert(opType != OpType.NotValid, "bad OpType"); 52Debug.Assert(opType != OpType.Leaf, "bad OpType - Leaf"); 88internal OpType RuleOpType 121internal SimpleRule(OpType opType, ProcessNodeDelegate processDelegate) 163if (pattern.Op.OpType == OpType.Leaf)
System\Data\Query\InternalTrees\RulePatternOps.cs (1)
37private LeafOp() : base(OpType.Leaf) { }
System\Data\Query\InternalTrees\ScalarOps.cs (73)
31protected ConstantBaseOp(OpType opType, TypeUsage type, object value) 41protected ConstantBaseOp(OpType opType) 83: base(OpType.Constant, type, value) 87private ConstantOp() : base(OpType.Constant) { } 123: base(OpType.Null, type, null) 126private NullOp() : base(OpType.Null) { } 163: base(OpType.InternalConstant, type, value) 167private InternalConstantOp() : base(OpType.InternalConstant) { } 205: base(OpType.NullSentinel, type, value) 208private NullSentinelOp() : base(OpType.NullSentinel) { } 244: base(OpType.ConstantPredicate, type, value) 248: base(OpType.ConstantPredicate) 305internal VarRefOp(Var v) : base(OpType.VarRef, v.Type) 309private VarRefOp() : base(OpType.VarRef) { } 369: base(OpType.Function, function.ReturnParameter.TypeUsage) 373private FunctionOp() : base(OpType.Function) { } 428: base(OpType.Property, type) 433private PropertyOp() : base(OpType.Property) { } 482: base(OpType.Treat, type) 486private TreatOp() : base(OpType.Treat) { } 536: base(OpType.IsOf, type) 541private IsOfOp() : base(OpType.IsOf) { } 587internal CastOp(TypeUsage type) : base(OpType.Cast, type) { } 588private CastOp() : base(OpType.Cast) { } 633internal SoftCastOp(TypeUsage type) : base(OpType.SoftCast, type) { } 634private SoftCastOp() : base(OpType.SoftCast) { } 673internal ComparisonOp(OpType opType, TypeUsage type) 677private ComparisonOp(OpType opType) : base(opType) { } 684internal static readonly ComparisonOp PatternEq = new ComparisonOp(OpType.EQ); 717: base(OpType.Like, boolType) { } 718private LikeOp() : base(OpType.Like) { } 759internal ConditionalOp(OpType optype, TypeUsage type) : base(optype, type) 762private ConditionalOp(OpType opType) : base(opType) { } 769internal static readonly ConditionalOp PatternAnd = new ConditionalOp(OpType.And); 770internal static readonly ConditionalOp PatternOr = new ConditionalOp(OpType.Or); 771internal static readonly ConditionalOp PatternNot = new ConditionalOp(OpType.Not); 772internal static readonly ConditionalOp PatternIsNull = new ConditionalOp(OpType.IsNull); 799internal CaseOp(TypeUsage type) : base(OpType.Case, type) { } 800private CaseOp() : base(OpType.Case) { } 840: base(OpType.Aggregate, aggFunc.ReturnParameter.TypeUsage) 845private AggregateOp() : base(OpType.Aggregate) { } 894internal CollectOp(TypeUsage type) : base(OpType.Collect, type) { } 895private CollectOp() : base(OpType.Collect) { } 939private RelPropertyOp() : base(OpType.RelProperty) { } 942: base(OpType.RelProperty, type) 996internal NewEntityBaseOp(OpType opType, TypeUsage type, bool scoped, EntitySet entitySet, List<RelProperty> relProperties) 1006protected NewEntityBaseOp(OpType opType) : base(opType) { } 1034private NewEntityOp() : base(OpType.NewEntity) { } 1037: base(OpType.NewEntity, type, scoped, entitySet, relProperties) 1073internal NewInstanceOp(TypeUsage type) : base(OpType.NewInstance, type) 1078private NewInstanceOp() : base(OpType.NewInstance) { } 1118: base(OpType.DiscriminatedNewEntity, type, true, entitySet, relProperties) 1123private DiscriminatedNewEntityOp() : base(OpType.DiscriminatedNewEntity) { } 1159internal NewRecordOp(TypeUsage type) : base(OpType.NewRecord, type) 1172: base(OpType.NewRecord, type) 1182private NewRecordOp() : base(OpType.NewRecord) { } 1244internal NewMultisetOp(TypeUsage type) : base(OpType.NewMultiset, type) { } 1245private NewMultisetOp() : base(OpType.NewMultiset) { } 1279internal ArithmeticOp(OpType opType, TypeUsage type) 1315: base(OpType.Ref, type) 1319private RefOp() : base(OpType.Ref) { } 1364: base(OpType.Exists, type) 1367private ExistsOp() : base(OpType.Exists) { } 1406internal ElementOp(TypeUsage type) : base(OpType.Element, type) { } 1407private ElementOp() : base(OpType.Element) { } 1446internal GetRefKeyOp(TypeUsage type) : base(OpType.GetRefKey, type) { } 1447private GetRefKeyOp() : base(OpType.GetRefKey) { } 1486internal GetEntityRefOp(TypeUsage type) : base(OpType.GetEntityRef, type) { } 1487private GetEntityRefOp() : base(OpType.GetEntityRef) { } 1526internal DerefOp(TypeUsage type) : base(OpType.Deref, type) { } 1527private DerefOp() : base(OpType.Deref) { } 1571: base(OpType.Navigate, type) 1575private NavigateOp() : base(OpType.Navigate) { }
System\Data\Query\PlanCompiler\AggregatePushdown.cs (12)
335if (inputNode.Op.OpType == OpType.SoftCast) 341if (inputNode.Op.OpType == OpType.Collect) 405if (n.Child0.Op.OpType != OpType.VarRef) 433while (currentNode.Child0.Op.OpType == OpType.Project) 450if (currentNode.Child0.Op.OpType != OpType.Unnest) 508while (currentNode.Op.OpType == OpType.Cast) 691else if (definingNodeOp.OpType == OpType.NewRecord) 815if (node.Op.OpType != OpType.VarRef) 933if (groupByAncestor.Op.OpType == OpType.Project) 955if (node.Op.OpType != OpType.Project 956&& node.Op.OpType != OpType.Filter 957&& node.Op.OpType != OpType.ConstrainedSort
System\Data\Query\PlanCompiler\CTreeGenerator.cs (26)
736if (OpType.UnaryMinus == op.OpType) 750case OpType.Divide: 756case OpType.Minus: 762case OpType.Modulo: 768case OpType.Multiply: 774case OpType.Plus: 789PlanCompiler.Assert(resultExpr != null, string.Format(CultureInfo.InvariantCulture, "ArithmeticOp OpType not recognized: {0}", Enum.GetName(typeof(OpType), op.OpType))); 853case OpType.EQ: 859case OpType.NE: 865case OpType.LT: 871case OpType.GT: 877case OpType.LE: 883case OpType.GE: 897PlanCompiler.Assert(compExpr != null, string.Format(CultureInfo.InvariantCulture, "ComparisonOp OpType not recognized: {0}", Enum.GetName(typeof(OpType), op.OpType))); 913case OpType.IsNull: 919case OpType.And: 925case OpType.Or: 931case OpType.Not: 956PlanCompiler.Assert(condExpr != null, string.Format(CultureInfo.InvariantCulture, "ConditionalOp OpType not recognized: {0}", Enum.GetName(typeof(OpType), op.OpType))); 1322PlanCompiler.Assert(n.Child0.Op.OpType == OpType.VarDef, 1355if (relOpNode.Op.OpType == OpType.Project) 1590bool nullSkip = (OpType.Null == n.Child1.Op.OpType); 1591bool nullLimit = (OpType.Null == n.Child2.Op.OpType); 1836if (joinInputNode.Op.OpType == OpType.Filter && joinInputNode.Child0.Op.OpType == OpType.ScanTable) 2254if (n.Child0.Op.OpType != OpType.Project)
System\Data\Query\PlanCompiler\ITreeGenerator.cs (40)
194private static Dictionary<DbExpressionKind, OpType> s_opMap = InitializeExpressionKindToOpTypeMap(); 217private static Dictionary<DbExpressionKind, OpType> InitializeExpressionKindToOpTypeMap() 219Dictionary<DbExpressionKind, OpType> opMap = new Dictionary<DbExpressionKind, OpType>(12); 224opMap[DbExpressionKind.Plus] = OpType.Plus; 225opMap[DbExpressionKind.Minus] = OpType.Minus; 226opMap[DbExpressionKind.Multiply] = OpType.Multiply; 227opMap[DbExpressionKind.Divide] = OpType.Divide; 228opMap[DbExpressionKind.Modulo] = OpType.Modulo; 229opMap[DbExpressionKind.UnaryMinus] = OpType.UnaryMinus; 234opMap[DbExpressionKind.Equals] = OpType.EQ; 235opMap[DbExpressionKind.NotEquals] = OpType.NE; 236opMap[DbExpressionKind.LessThan] = OpType.LT; 237opMap[DbExpressionKind.GreaterThan] = OpType.GT; 238opMap[DbExpressionKind.LessThanOrEquals] = OpType.LE; 239opMap[DbExpressionKind.GreaterThanOrEquals] = OpType.GE; 542arguments.Add(_iqtCommand.CreateNode(_iqtCommand.CreateConditionalOp(OpType.Not), predCopy)); 578ComparisonOp comparisonOp = _iqtCommand.CreateComparisonOp(OpType.EQ); 728if (input.Op.OpType == OpType.Project) 1351if (OpType.ConstrainedSort == inputNode.Op.OpType && 1352OpType.Null == inputNode.Child2.Op.OpType) 1372else if (OpType.Sort == inputNode.Op.OpType) 1429if (OpType.Project == inputNode.Op.OpType 1431|| (OpType.Sort == inputNode.Child0.Op.OpType 1432|| OpType.ConstrainedSort == inputNode.Child0.Op.OpType))) 1487Op op = _iqtCommand.CreateConditionalOp(OpType.IsNull); 1521Op op = _iqtCommand.CreateConditionalOp(OpType.And); 1527Op op = _iqtCommand.CreateConditionalOp(OpType.Or); 1533Op op = _iqtCommand.CreateConditionalOp(OpType.Not); 1578_iqtCommand.CreateConditionalOp(OpType.Not), 2723_iqtCommand.CreateConditionalOp(OpType.Or), 2725_iqtCommand.CreateComparisonOp(OpType.EQ), keyNode, copyKeyNode), 2727_iqtCommand.CreateConditionalOp(OpType.And), 2729_iqtCommand.CreateConditionalOp(OpType.IsNull), 2732_iqtCommand.CreateConditionalOp(OpType.IsNull), 2742_iqtCommand.CreateConditionalOp(OpType.And), 2983_iqtCommand.CreateConditionalOp(OpType.Not), 2993_iqtCommand.CreateConditionalOp(OpType.IsNull), 2999_iqtCommand.CreateConditionalOp(OpType.Or), 3027retNode = _iqtCommand.CreateNode(_iqtCommand.CreateConditionalOp(OpType.Not), retNode);
System\Data\Query\PlanCompiler\JoinGraph.cs (37)
431OpType joinOpType = joinNode.Node.Op.OpType; 432PlanCompiler.Assert((joinOpType == OpType.LeftOuterJoin || joinOpType == OpType.InnerJoin), 435JoinKind joinKind = joinOpType == OpType.LeftOuterJoin ? JoinKind.LeftOuter : JoinKind.Inner; 644if (joinNode.Op.OpType == OpType.FullOuterJoin) 689case OpType.ScanTable: 696case OpType.InnerJoin: 697case OpType.LeftOuterJoin: 698case OpType.FullOuterJoin: 710case OpType.CrossJoin: 846OpType opType = joinNode.Node.Op.OpType; 851if (opType == OpType.CrossJoin) 866if (opType == OpType.FullOuterJoin) 871else if (opType == OpType.LeftOuterJoin) 889if (joinNode.Node.Op.OpType == OpType.FullOuterJoin || 900if ((opType == OpType.LeftOuterJoin) && 906JoinKind joinKind = (opType == OpType.LeftOuterJoin) ? JoinKind.LeftOuter : JoinKind.Inner; 935case OpType.FullOuterJoin: 936case OpType.LeftOuterJoin: 937case OpType.InnerJoin: 938case OpType.CrossJoin: 943case OpType.ScanTable: 1133foreach (AugmentedJoinNode augmentedJoinNode in m_vertexes.OfType<AugmentedJoinNode>().Where(j => j.Node.Op.OpType == OpType.LeftOuterJoin && j.JoinEdges.Count > 0)) 1185if (parent.Node.Op.OpType != OpType.LeftOuterJoin || parent.Children[0] != currentNode) 1399(disallowAnyJoin || currentParent.Node.Op.OpType != OpType.LeftOuterJoin || currentParent.Children[0] != currentNode) 1427if (currentNode.Parent.Node.Op.OpType == OpType.LeftOuterJoin && 2339Node isNotNullNode = m_command.CreateNode(m_command.CreateConditionalOp(OpType.IsNull), varRefNode); 2340isNotNullNode = m_command.CreateNode(m_command.CreateConditionalOp(OpType.Not), isNotNullNode); 2347predNode = m_command.CreateNode(m_command.CreateConditionalOp(OpType.And), 2440Node equalsNode = m_command.CreateNode(m_command.CreateComparisonOp(OpType.EQ), 2504if (joinNode.Node.Op.OpType == OpType.CrossJoin) 2520if (leftNode != null && rightNode == null && joinNode.Node.Op.OpType == OpType.LeftOuterJoin) 2639case OpType.ScanTable: 2643case OpType.CrossJoin: 2644case OpType.LeftOuterJoin: 2645case OpType.InnerJoin: 2646case OpType.FullOuterJoin:
System\Data\Query\PlanCompiler\KeyPullup.cs (2)
255if (OpType.UnionAll == branchNode.Op.OpType) 290if (OpType.UnionAll == branchNode.Op.OpType && null != ((UnionAllOp)branchNode.Op).BranchDiscriminator)
System\Data\Query\PlanCompiler\NestPullup.cs (32)
103PlanCompiler.Assert(Command.Root.Op.OpType == OpType.PhysicalProject, "root node is not physicalProject?"); 130PlanCompiler.Assert(n.Op.OpType != OpType.SingleStreamNest, "illegal singleStreamNest?"); 131return (n.Op.OpType == OpType.SingleStreamNest || n.Op.OpType == OpType.MultiStreamNest); 294if (n.Child0.Op.OpType == OpType.VarRef) 336if (chi.Op.OpType == OpType.Collect) 340else if (chi.Op.OpType == OpType.VarRef) 437if (OpType.SingleStreamNest == chi.Op.OpType) 463if (op.OpType != OpType.MultiStreamNest && chi.Op.IsRelOp) 486if (chi.Op.OpType == OpType.MultiStreamNest) 499if ((op.OpType == OpType.FullOuterJoin) 500|| ((op.OpType == OpType.LeftOuterJoin || op.OpType == OpType.OuterApply) && n.Child1.Op.OpType == OpType.MultiStreamNest)) 570while (newFilterChild.Op.OpType == OpType.MultiStreamNest) 601Command.CreateConditionalOp(OpType.Not), 603Command.CreateConditionalOp(OpType.IsNull), 814if (n.Child0.Op.OpType == OpType.Sort) 856if (newNode.Op.OpType == OpType.Project && IsNestOpNode(newNode.Child0)) 999if (OpType.Collect == definingExprNode.Op.OpType) 1002PlanCompiler.Assert(OpType.PhysicalProject == definingExprNode.Child0.Op.OpType, "collect without physicalProject?"); 1010else if (OpType.VarRef == definingExprNode.Op.OpType) 1246if (OpType.Sort == nestOpInput.Op.OpType) 1745PlanCompiler.Assert(n.Child0.Op.OpType == OpType.VarDef, "Unnest without VarDef input?"); 1750if (OpType.Function == newNode.Op.OpType) 1757else if (OpType.Collect == newNode.Op.OpType) 1764PlanCompiler.Assert(newNode.Op.OpType == OpType.PhysicalProject, "collect without physicalProject?"); 1769else if (OpType.VarRef == newNode.Op.OpType) 1783PlanCompiler.Assert(newNode.Op.OpType == OpType.PhysicalProject, "driving node is not physicalProject?"); 1796if (newNode.Op.OpType == OpType.Sort) 2130if (chi.Op.OpType == OpType.MultiStreamNest) 2754if (command.Root.Child0 != null && command.Root.Child0.Op.OpType == OpType.Sort)
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (39)
202PlanCompiler.Assert(rootNode.Op.OpType == OpType.PhysicalProject, "root node is not PhysicalProjectOp?"); 310if (inputOp.OpType == OpType.Null) 375while (node.Op.OpType == OpType.SoftCast) 825PlanCompiler.Assert(definingExprNode.Op.OpType != OpType.Function, "Flattening of TVF output is not allowed."); 1202case OpType.Project: 1207case OpType.ScanTable: 1213case OpType.Filter: 1214case OpType.SingleRow: 1215case OpType.Sort: 1216case OpType.ConstrainedSort: 1219case OpType.UnionAll: 1220case OpType.Intersect: 1221case OpType.Except: 1227case OpType.Unnest: 1233case OpType.Distinct: 1333if (chi.HasChild0 && chi.Child0.Op.OpType == OpType.Function) 1733PlanCompiler.Assert(n.Child0.Op.OpType == OpType.NewRecord, "Expected a record constructor here. Found " + n.Child0.Op.OpType + " instead"); 1997if (resultNode.Op.OpType != OpType.NewRecord) 2129PlanCompiler.Assert(op.OpType == OpType.EQ || op.OpType == OpType.NE, "non-equality comparison of structured types?"); 2161andNode = m_command.CreateNode(m_command.CreateConditionalOp(OpType.And), andNode, newCompNode); 2176if (op.OpType != OpType.IsNull) 2221Node isNullNode = m_command.CreateNode(m_command.CreateConditionalOp(OpType.IsNull), propertyValue); 2225andNode = m_command.CreateNode(m_command.CreateConditionalOp(OpType.And), andNode, isNullNode); 2283PlanCompiler.Assert(op.OpType == OpType.GetEntityRef || op.OpType == OpType.GetRefKey, "Expecting GetEntityRef or GetRefKey ops"); 2297if (op.OpType == OpType.GetRefKey) 2303PlanCompiler.Assert(op.OpType == OpType.GetEntityRef, 2333PlanCompiler.Assert(op.OpType == OpType.Property || op.OpType == OpType.RelProperty, 2621ComparisonOp discriminatorPredicateOp = m_command.CreateComparisonOp(OpType.EQ); 2681PlanCompiler.Assert(op.OpType == OpType.NewInstance || op.OpType == OpType.NewRecord || op.OpType == OpType.DiscriminatedNewEntity || op.OpType == OpType.NewEntity, 2695if (op.OpType == OpType.NewRecord) 2700else if (op.OpType == OpType.DiscriminatedNewEntity) 3041current = m_command.CreateNode(m_command.CreateConditionalOp(OpType.Or), current, typeComparisonNode); 3061ComparisonOp eqCompOp = m_command.CreateComparisonOp(OpType.EQ);
System\Data\Query\PlanCompiler\Normalizer.cs (2)
171if (OpType.SoftCast == argNode.Op.OpType) 176while (OpType.SoftCast == argNode.Op.OpType)
System\Data\Query\PlanCompiler\PlanCompilerUtil.cs (9)
56if (n.Child1.Op.OpType == OpType.Null) 61if (n.Child2.Op.OpType == OpType.Null) 91internal static bool IsConstantBaseOp(OpType opType) 93return opType == OpType.Constant || 94opType == OpType.InternalConstant || 95opType == OpType.Null || 96opType == OpType.NullSentinel; 133result = command.CreateNode(command.CreateConditionalOp(OpType.And), result, predicatePart2); 152node => (node.Op.OpType != OpType.And),
System\Data\Query\PlanCompiler\Predicate.cs (15)
119andNode = m_command.CreateNode(m_command.CreateConditionalOp(OpType.And), 218if (part.Op.OpType != OpType.EQ) 276if (andTree.Op.OpType == OpType.And) 344if (simplePredicateNode.Op.OpType != OpType.EQ) 427case OpType.EQ: 428case OpType.NE: 429case OpType.GT: 430case OpType.GE: 431case OpType.LT: 432case OpType.LE: 445case OpType.Not: 446if (simplePredNode.Child0.Op.OpType != OpType.IsNull) 453case OpType.Like: 457if (constantOp == null || (constantOp.OpType == OpType.Null)) 480if (left.Op.OpType != OpType.VarRef)
System\Data\Query\PlanCompiler\PreProcessor.cs (26)
407if (viewNode.Op.OpType == OpType.Project) 480if (navigateOpNode.Child0.Op.OpType == OpType.GetEntityRef && 539Node predicateNode = m_command.BuildComparison(OpType.EQ, navigateOpNode.Child0, sourceEnd); 654Node keyComparisonPred = m_command.BuildComparison(OpType.EQ, derefOpNode.Child0, entityRefNode); 723Node joinPredicate = m_command.BuildComparison(OpType.EQ, 871Node predicateNode = m_command.BuildComparison(OpType.EQ, 939Node predicate = m_command.BuildComparison(OpType.EQ, 1228if (op.OpType == OpType.IsNull && TypeSemantics.IsRowType(n.Child0.Op.Type) || TypeSemantics.IsComplexType(n.Child0.Op.Type)) 1308if (n.Op.OpType != OpType.Property || (!Helper.IsNavigationProperty(((PropertyOp)n.Op).PropertyInfo))) 1314if (currentNode.Op.OpType == OpType.SoftCast) 1318return currentNode.Op.OpType == OpType.VarRef; 1468ConditionalOp isNullOp = m_command.CreateConditionalOp(OpType.IsNull); 1475ConditionalOp notOp = m_command.CreateConditionalOp(OpType.Not); 1491ComparisonOp equalsOp = m_command.CreateComparisonOp(OpType.EQ); 1602PlanCompiler.Assert(op.OpType == OpType.NewEntity || op.OpType == OpType.DiscriminatedNewEntity, 1604int offset = (op.OpType == OpType.DiscriminatedNewEntity) ? 1 : 0; 1671Node predicateNode = m_command.BuildComparison(OpType.EQ, 2007ComparisonOp equalsOp = m_command.CreateComparisonOp(OpType.EQ); 2044if (node.Op.OpType != OpType.Constant && node.Op.OpType != OpType.Null) 2186if (op.OpType == OpType.InnerJoin || op.OpType == OpType.LeftOuterJoin) 2225if (ancestor.Op.OpType == OpType.PhysicalProject) 2342if (OpType.Sort == n.Child0.Op.OpType || OpType.ConstrainedSort == n.Child0.Op.OpType)
System\Data\Query\PlanCompiler\ProjectionPruner.cs (6)
420if (op.Keys.Count > 1 && n.Child0.Op.OpType == OpType.Project) 532List<Node> constantKeys = varDefListNode.Children.Where(d => d.Op.OpType == OpType.VarDef 569if (result.Op.OpType == OpType.GroupByInto && n.Child3.Children.Count == 0) 595if (n.Op.OpType == OpType.CrossJoin) 677if (OpType.Intersect == op.OpType || OpType.Except == op.OpType)
System\Data\Query\PlanCompiler\PropertyPushdownHelper.cs (3)
662if (n.Op.OpType == OpType.CrossJoin) 742if (op.OpType == OpType.Intersect || op.OpType == OpType.Except)
System\Data\Query\PlanCompiler\SubqueryTrackingVisitor.cs (7)
207n.Op.OpType == OpType.Project || n.Op.OpType == OpType.Filter || 208n.Op.OpType == OpType.GroupBy || n.Op.OpType == OpType.GroupByInto, 240PlanCompiler.Assert(n.Op.OpType == OpType.InnerJoin || 241n.Op.OpType == OpType.LeftOuterJoin || 242n.Op.OpType == OpType.FullOuterJoin, "unexpected op?");
System\Data\Query\PlanCompiler\TransformationRules.cs (90)
92if (node.Op.OpType == OpType.VarRef) 126if (node.Op.OpType == OpType.VarRef) 208a.Op.OpType == OpType.CrossApply || 209a.Op.OpType == OpType.OuterApply); 228internal static bool IsOpNotSafeForNullSentinelValueChange(OpType optype) 230return optype == OpType.Distinct || 231optype == OpType.GroupBy || 232optype == OpType.Intersect || 233optype == OpType.Except; 345Node whenNode = this.Command.CreateNode(this.Command.CreateConditionalOp(OpType.IsNull), varRefNode); 559if (varRefMap != null && node.Op.OpType == OpType.VarRef) 695List<InternalTrees.Rule>[] lookupTable = new List<InternalTrees.Rule>[(int)OpType.MaxMarker]; 825internal static readonly SimpleRule Rule_SimplifyCase = new SimpleRule(OpType.Case, ProcessSimplifyCase); 826internal static readonly SimpleRule Rule_FlattenCase = new SimpleRule(OpType.Case, ProcessFlattenCase); 930if (OpType.SoftCast == caseOpNode.Children[i].Op.OpType) 945if (OpType.SoftCast == caseOpNode.Children[i + 1].Op.OpType) 951if (caseOpNode.Children[i].Op.OpType != OpType.ConstantPredicate) 1039if (elseChild.Op.OpType != OpType.Case) 1076PlanCompiler.Assert(node.Op.OpType == OpType.EQ || node.Op.OpType == OpType.NE, "unexpected comparison op type?"); 1084bool result = (node.Op.OpType == OpType.EQ) ? (bool)comparisonStatus : !((bool)comparisonStatus); 1199case OpType.And: 1202case OpType.Or: 1205case OpType.Not: 1434context.Command.CreateConditionalOp(OpType.And), 1466if (predicateNode.Op.OpType == OpType.ConstantPredicate) 1571if (setOp.OpType == OpType.Except && branchId == 1) 1590if (branchId == 0 && filterNode.Op.OpType != OpType.Except) 1821if (joinOp.OpType == OpType.LeftOuterJoin) 1840if (leftInputNode.Op.OpType != OpType.ScanTable) 1847if ((rightInputNode.Op.OpType != OpType.ScanTable) && 1848(joinOp.OpType != OpType.LeftOuterJoin)) 1860if (joinOp.OpType == OpType.CrossJoin || joinOp.OpType == OpType.InnerJoin) 1886if (joinOp.OpType == OpType.CrossJoin) 1892PlanCompiler.Assert(joinOp.OpType == OpType.InnerJoin, "unexpected non-InnerJoin?"); 1898newJoinPredicateNode = (joinOp.OpType == OpType.CrossJoin) ? null : joinNode.Child2; 1914if (joinOp.OpType == OpType.CrossJoin) 2021if (n.Child0.Op.OpType == OpType.SingleRowTable || 2022(n.Child0.Op.OpType == OpType.Project && 2023n.Child0.Child0.Op.OpType == OpType.SingleRowTable)) 2206internal static readonly SimpleRule Rule_ProjectOpWithSimpleVarRedefinitions = new SimpleRule(OpType.Project, ProcessProjectWithSimpleVarRedefinitions); 2243if (definingExprNode.Op.OpType == OpType.VarRef) 2299internal static readonly SimpleRule Rule_ProjectOpWithNullSentinel = new SimpleRule(OpType.Project, ProcessProjectOpWithNullSentinel); 2332if (varDefListNode.Children.Where(c => c.Child0.Op.OpType == OpType.NullSentinel).Count() == 0) 2348if (!canChangeNullSentinelValue || !TransformationRulesContext.TryGetInt32Var(n.Child1.Children.Where(child => child.Child0.Op.OpType == OpType.Constant || child.Child0.Op.OpType == OpType.InternalConstant).Select(child => ((VarDefOp)(child.Op)).Var), out inputSentinel)) 2350inputSentinel = n.Child1.Children.Where(child => child.Child0.Op.OpType == OpType.NullSentinel).Select(child => ((VarDefOp)(child.Op)).Var).FirstOrDefault(); 2364if (definingExprNode.Op.OpType == OpType.NullSentinel) 2459if (applyNode.Op.OpType == OpType.CrossApply) 2568if (varDefNode.Child0.Op.OpType == OpType.NullSentinel && sentinelIsInt32 && trc.CanChangeNullSentinelValue) 2720(varDefListNode.Child0.Child0.Op.OpType == OpType.InternalConstant || varDefListNode.Child0.Child0.Op.OpType == OpType.NullSentinel)) 2743PlanCompiler.Assert(varDefNode.Op.OpType == OpType.VarDef, "Expected VarDefOp. Found " + varDefNode.Op.OpType + " instead"); 2765varDefNode.Child0.Op.OpType == OpType.NullSentinel)) 2842if (applyOp.OpType == OpType.OuterApply && 2871if (applyOp.OpType == OpType.CrossApply) 2920OpType applyKind = applyNode.Op.OpType; 2972private static bool CanRewriteApply(Node rightChild, ExtendedNodeInfo applyRightChildNodeInfo, OpType applyKind) 2987if (applyKind == OpType.CrossApply && (applyRightChildNodeInfo.MinRows != RowCount.One)) 3415if ((joinNode.Op.OpType != OpType.LeftOuterJoin) && 3416(joinNode.Child0.Op.OpType == OpType.Project) && 3417(joinNode.Child1.Op.OpType == OpType.Project)) 3459if (joinNode.Child0.Op.OpType == OpType.Project) 3466PlanCompiler.Assert(joinNode.Op.OpType != OpType.LeftOuterJoin, "unexpected non-LeftOuterJoin"); 3560if (joinNode.Child0.Op.OpType == OpType.Filter) 3568if (joinNode.Child1.Op.OpType == OpType.Filter && joinNode.Op.OpType != OpType.LeftOuterJoin) 3577command.CreateConditionalOp(OpType.And), 3593if (joinNode.Op.OpType == OpType.CrossJoin) 3647if (joinNode.Child0.Op.OpType == OpType.SingleRowTable) 3722if (singleRowNode.Child0.Op.OpType == OpType.Filter) 3782new SimpleRule(OpType.UnionAll, ProcessSetOpOverEmptySet); 3784new SimpleRule(OpType.Intersect, ProcessSetOpOverEmptySet); 3786new SimpleRule(OpType.Except, ProcessSetOpOverEmptySet); 3825if (!rightChildIsEmptySet && setOp.OpType == OpType.UnionAll || 3826!leftChildIsEmptySet && setOp.OpType == OpType.Intersect) 3864internal static readonly SimpleRule Rule_GroupByOpWithSimpleVarRedefinitions = new SimpleRule(OpType.GroupBy, ProcessGroupByWithSimpleVarRedefinitions); 3902if (definingExprNode.Op.OpType == OpType.VarRef) 4006if (varDefNode.Child0.Op.OpType == OpType.Constant || varDefNode.Child0.Op.OpType == OpType.InternalConstant || varDefNode.Child0.Op.OpType == OpType.NullSentinel) 4201OpType.GroupBy, ProcessGroupByOpOnAllInputColumnsWithAggregateOperation); 4238if (n.Child0.Op.OpType != OpType.ScanTable) 4246|| n.Child2.Child0.Child0.Op.OpType != OpType.Aggregate) 4295command.CreateComparisonOp(OpType.EQ), 4301command.CreateConditionalOp(OpType.And), 4338internal static readonly SimpleRule Rule_SortOpOverAtMostOneRow = new SimpleRule(OpType.Sort, ProcessSortOpOverAtMostOneRow); 4377internal static readonly SimpleRule Rule_ConstrainedSortOpOverEmptySet = new SimpleRule(OpType.ConstrainedSort, ProcessConstrainedSortOpOverEmptySet); 4417internal static readonly SimpleRule Rule_DistinctOpOfKeys = new SimpleRule(OpType.Distinct, ProcessDistinctOpOfKeys);
System\Data\Query\PlanCompiler\VarRefManager.cs (9)
121case OpType.ConstrainedSort: 122case OpType.Sort: 126case OpType.Distinct: 130case OpType.Except: 131case OpType.Intersect: 132case OpType.UnionAll: 136case OpType.GroupBy: 140case OpType.PhysicalProject: 144case OpType.Project: