Skip to content
Permalink
Browse files
Only assert concatenation is invalid in < 4.0
Patch by Manish Ghildiyal; reviewed by bereng and brandonwilliams for
CASSANDRA-17383
  • Loading branch information
Manish Ghildiyal authored and driftx committed Feb 17, 2022
1 parent b00e16a commit c0fdfc4491cc1fcc687539b143df6c566d7e5e0a
Showing 1 changed file with 4 additions and 1 deletion.
@@ -147,7 +147,10 @@ def test_udf_overload(self):
session.execute("CREATE OR REPLACE FUNCTION overloaded(v ascii) called on null input RETURNS text LANGUAGE java AS 'return \"f1\";'")

# ensure that works with correct specificity
assert_none(session, "SELECT v FROM tab WHERE k = overloaded('foo')")
if self.cluster.version() < LooseVersion('4.1'):
assert_invalid(session, "SELECT v FROM tab WHERE k = overloaded('foo')")
else:
assert_none(session, "SELECT v FROM tab WHERE k = overloaded('foo')")
assert_none(session, "SELECT v FROM tab WHERE k = overloaded((text) 'foo')")
assert_none(session, "SELECT v FROM tab WHERE k = overloaded((ascii) 'foo')")
assert_none(session, "SELECT v FROM tab WHERE k = overloaded((varchar) 'foo')")

0 comments on commit c0fdfc4

Please sign in to comment.