Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cql-pytest: translate Cassandra's tests for CAST operations #14528

Closed
wants to merge 1 commit into from

Conversation

nyh
Copy link
Contributor

@nyh nyh commented Jul 5, 2023

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.

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 scylladb#14501: Cannot Cast Counter To Double

and by three previously unknown or undocumented issues:

Refs scylladb#14508: SELECT CAST column names should match Cassandra's
Refs scylladb#14518: CAST from timestamp to string not same as Cassandra on zero
             milliseconds
Refs scylladb#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>
@nyh nyh requested a review from cvybhu July 5, 2023 11:05
@scylladb-promoter
Copy link
Contributor

@nyh
Copy link
Contributor Author

nyh commented Jul 5, 2023

CI state FAILURE - https://jenkins.scylladb.com/job/scylla-master/job/scylla-ci/2274/

An ASAN crash in debug build in an unrelated test, I don't know what caused it, and couldn't find similar issues, so I opened #14531. I'll restart the CI.

@scylladb-promoter
Copy link
Contributor

@nyh
Copy link
Contributor Author

nyh commented Jul 6, 2023

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.

By the way, 24 hours after I reported this Cassandra bug, they already have a fix in the JIRA. Maybe we too should be more diligent in fixing known, reproducible, functionality bugs.

@nyh
Copy link
Contributor Author

nyh commented Jul 12, 2023

@scylladb/scylla-maint needs reviews and/or merging please.

@denesb
Copy link
Contributor

denesb commented Jul 12, 2023

By the way, 24 hours after I reported this Cassandra bug, they already have a fix in the JIRA. Maybe we too should be more diligent in fixing known, reproducible, functionality bugs.

Yes, even if nobody complained yet, it is just bad when somebody steps on a minor yet annoying issue, that has an issue in the tracker, opened 5 years ago, and severeal xfailing tests too.

nyh added a commit that referenced this pull request Aug 13, 2023
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)
nyh added a commit that referenced this pull request Aug 13, 2023
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)
(cherry picked from commit e03c21a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants