Repository navigation
Conversation
…(milestone 58) With --sqlcmd name=path[,name=path...], SQLCMD runs a generated query through JDBC and through each sqlcmd (--output-format=csv --output-skip-metadata --query) against the same cluster, reads each csv field back as its column's type and checks that every sqlcmd prints JDBC's rows. With two or more sqlcmds it also compares their csv text, counting and logging differences (logs/voltdb/sqlcmd-differences.log) without failing, so an old sqlcmd can be compared with the rebuilt one of ENG-30789. It found two bugs in the csv writer (VoltTableUtil.toCSVWriter) that the 16.1.0-SNAPSHOT sqlcmd and the rebuilt one share: ENG-30895, every BOOLEAN is an empty field, and ENG-30896, a TIMESTAMP before 1970 whose microseconds are not whole milliseconds is written as the next millisecond, a minus sign and the microseconds. While --avoid-known-bugs is true the oracle folds both in and counts them. voltdb/repros has a script reproduction of each.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the SQLCMD oracle. It tests the rebuilt sqlcmd (ENG-30789, internal
ENG-30789-sqlcmd-rebuilt) against JDBC and against the sqlcmd it replaces.With
--sqlcmd name=path[,name=path...], each check generates a query (as DIFF does) and runs it:--output-format=csv --output-skip-metadata --query=..., against the same cluster.Each csv field is read back as its column's type, from the JDBC metadata, and every sqlcmd must print JDBC's rows. With two or more sqlcmds, their csv text is also compared as written. A text difference is counted and logged to
logs/voltdb/sqlcmd-differences.logbut doesn't fail the run, since the rebuilt sqlcmd changes some output on purpose.SQLCMD is opt-in: without
--sqlcmdit does nothing, and it is not added to the nightly job's oracles.Results
These runs used the 16.1.0-SNAPSHOT sqlcmd of master 133b68bb54 ("old") and the rebuilt sqlcmd of 09e0680bdf ("new"). The new sqlcmd's changed volt-server classes were compiled over that master build.
Bugs found
Both are in
VoltTableUtil.toCSVWriter, which the old and new sqlcmd share and which also writes CSV snapshots.01:42:38.818363as01:42:38.819-637, and1969-12-31 23:59:59.999999as1970-01-01 00:00:00.000-01.While
--avoid-known-bugsis true, the oracle allows for both and counts them at exit. Each has a script reproduction involtdb/repros/, and both report BROKEN on master.Checks
TestVoltDBSqlcmdOracle, the csv parser: 5 of 5 pass.mvn verify -DskipTestspasses with JDK 17. With JDK 21, SpotBugs 4.7.3 can't read the class files and crashes, unrelated to this change.