Skip to content

Commit

Permalink
cql-pytest: translate Cassandra's tests for CAST operations
Browse files Browse the repository at this point in the history
This is a translation of Cassandra's CQL unit test source file
functions/CastFctsTest.java into our cql-pytest framework.

There are 13 tests, 9 of them currently xfail.

The failures are caused by one recently-discovered issue:

Refs #14501: Cannot Cast Counter To Double

and by three previously unknown or undocumented issues:

Refs #14508: SELECT CAST column names should match Cassandra's
Refs #14518: CAST from timestamp to string not same as Cassandra on zero
             milliseconds
Refs #14522: Support CAST function not only in SELECT

Curiously, the careful translation of this test also caused me to
find a bug in Cassandra https://issues.apache.org/jira/browse/CASSANDRA-18647
which the test in Java missed because it made the same mistake as the
implementation.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>

Closes #14528

(cherry picked from commit f08bc83)
  • Loading branch information
nyh committed Aug 13, 2023
1 parent 79b5bef commit e03c21a
Show file tree
Hide file tree
Showing 2 changed files with 489 additions and 0 deletions.

0 comments on commit e03c21a

Please sign in to comment.