Beispiel #1
0
        public override void DetermineCharacteristics(Plan plan)
        {
            if (Modifiers != null)
            {
                IsLiteral       = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsLiteral", Operator.IsLiteral.ToString()));
                IsFunctional    = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsFunctional", Operator.IsFunctional.ToString()));
                IsDeterministic = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsDeterministic", Operator.IsDeterministic.ToString()));
                IsRepeatable    = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsRepeatable", Operator.IsRepeatable.ToString()));
                IsNilable       = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsNilable", Operator.IsNilable.ToString()));
            }
            else
            {
                IsLiteral       = Operator.IsLiteral;
                IsFunctional    = Operator.IsFunctional;
                IsDeterministic = Operator.IsDeterministic;
                IsRepeatable    = Operator.IsRepeatable;
                IsNilable       = Operator.IsNilable;
            }

            // Characteristics of an aggregate operator, unless overridden, are always based on the source node, rather than the
            // actual operands to the operator.
            IsLiteral       = IsLiteral && Nodes[0].IsLiteral;
            IsFunctional    = IsFunctional && Nodes[0].IsFunctional;
            IsDeterministic = IsDeterministic && Nodes[0].IsDeterministic;
            IsRepeatable    = IsRepeatable && Nodes[0].IsRepeatable;
            IsNilable       = IsNilable || Nodes[0].IsNilable;
        }
Beispiel #2
0
 // DetermineModifiers
 protected virtual void DetermineModifiers(Plan plan)
 {
     if (Modifiers != null)
     {
         IgnoreUnsupported = Boolean.Parse(LanguageModifiers.GetModifier(Modifiers, "IgnoreUnsupported", IgnoreUnsupported.ToString()));
         ShouldSupport     = Boolean.Parse(LanguageModifiers.GetModifier(Modifiers, "ShouldSupport", ShouldSupport.ToString()));
     }
 }
Beispiel #3
0
        protected override void DetermineModifiers(Plan plan)
        {
            base.DetermineModifiers(plan);

            if (Modifiers != null)
            {
                EnforcePredicate = Boolean.Parse(LanguageModifiers.GetModifier(Modifiers, "EnforcePredicate", EnforcePredicate.ToString()));
            }
        }
        public override void DetermineCharacteristics(Plan plan)
        {
            if (Modifiers != null)
            {
                IsLiteral       = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsLiteral", Operator.IsLiteral.ToString()));
                IsFunctional    = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsFunctional", Operator.IsFunctional.ToString()));
                IsDeterministic = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsDeterministic", Operator.IsDeterministic.ToString()));
                IsRepeatable    = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsRepeatable", Operator.IsRepeatable.ToString()));
                IsNilable       = Convert.ToBoolean(LanguageModifiers.GetModifier(Modifiers, "IsNilable", Operator.IsNilable.ToString()));
            }
            else
            {
                IsLiteral       = Operator.IsLiteral;
                IsFunctional    = Operator.IsFunctional;
                IsDeterministic = Operator.IsDeterministic;
                IsRepeatable    = Operator.IsRepeatable;
                IsNilable       = Operator.IsNilable;
            }

            for (int index = 0; index < Operator.Operands.Count; index++)
            {
                IsLiteral       = IsLiteral && Nodes[index].IsLiteral;
                IsFunctional    = IsFunctional && Nodes[index].IsFunctional;
                IsDeterministic = IsDeterministic && Nodes[index].IsDeterministic;
                IsRepeatable    = IsRepeatable && Nodes[index].IsRepeatable;
                IsNilable       = IsNilable || Nodes[index].IsNilable;
            }

            IsUniquePreserving = Convert.ToBoolean(MetaData.GetTag(Operator.MetaData, "DAE.IsUniquePreserving", IsUniquePreserving.ToString()));
            IsOrderPreserving  = Convert.ToBoolean(MetaData.GetTag(Operator.MetaData, "DAE.IsOrderPreserving", IsOrderPreserving.ToString()));
            // Order preserving is strictly stronger than unique preserving, so set it explicitly here
            if (IsOrderPreserving)
            {
                IsUniquePreserving = true;
            }
        }