Ejemplo n.º 1
0
        private SortedRangeSet CheckCompatibility(IValueSet other)
        {
            if (!this.Type.Equals(other.GetPrestoType()))
            {
                throw new ArgumentException($"Mismatched types: {this.Type} vs {other.GetPrestoType()}.");
            }

            if (!(other is SortedRangeSet))
            {
                throw new ArgumentException($"ValueSet is not a SortedRangeSet: {other.GetType()}.");
            }

            return((SortedRangeSet)other);
        }
Ejemplo n.º 2
0
        private AllOrNoneValueSet CheckCompatibility(IValueSet other)
        {
            if (this.Type.Equals(other.GetPrestoType()))
            {
                throw new ArgumentException($"Mismatched types: {this.Type} vs {other.GetPrestoType()}.");
            }

            if (!(other is AllOrNoneValueSet))
            {
                throw new ArgumentException($"ValueSet is not a AllOrNoneValueSet: {other.GetType().Name}.");
            }

            return((AllOrNoneValueSet)other);
        }