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