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