Example #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);
        }
Example #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);
        }