Repository navigation
Conversation
…CE_EPOCH and JSON functions in expressions
…y computed in Java)
…s the left table only)
This was referenced Nov 9, 2026
Author
|
Superseded by #51, which combines every ENG-30396 PR of this repo into one. This PR's branch is kept, and its description still has this milestone's details and lab results. |
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.
Milestone 19 of ENG-30396 (tracked in ENG-30581, epic ENG-30580 "SQL Housekeeping"): new types and functions (dates, JSON, FLOAT math, geography). Stacked on #18 (milestone 18), which is stacked on #17 to #1; review those first.
The nightly job runs the GEO oracle once VoltDB/internal#6364 is merged; VoltDB/pro#7108 adds it to
run-jenkins-sqlancer-test.sh's default. The new functions need no change there: every oracle that uses the expression generator writes them.Why
The generated expressions used ABS, FLOOR, CEILING, MOD, CHAR_LENGTH, string functions, CASE and COALESCE only:
These are separate code paths in VoltDB's planner and its C++ execution engine (boost date arithmetic, a JSON parser, S2 geometry).
What it changes
Functions in expressions (
gen/VoltDBExpressionGenerator):DATEADD(unit, n, t)andTRUNCATE(unit, t)keep t's type;TO_TIMESTAMP(unit, n)returns a TIMESTAMP.ast/VoltDBKeyword), which PARAMS never makes a parameter.GEO (
oracle/VoltDBGeographyOracle). Once per database it builds its own table of points and small counter-clockwise boxes, replicated or partitioned, and checks against geography computed in Java:POINTFROMTEXT(ASTEXT(p)).CREATE INDEXon the GEOGRAPHY column.The table is dropped afterwards, and the schema reader ignores it, so no other oracle sees its columns.
Workarounds for the bugs below, and the README: a section on all of this, the status line, the option and nightly tables, the bug table.
Bugs found
--avoid-known-bugsis trueDATEADD(YEAR, n, d)on a DATE February 29 into a non-leap year. With a DATE literal, one ad hoc SELECT aborts the server: an uncaughtboost::gregorian::bad_day_of_monthinNValue::castAsTimestamp. With a column, it is "Invalid date 'February 29' as '2025' is not a leap year". A TIMESTAMP, and MONTH 12, give February 28. Critical.a FULL JOIN b ON c >= b.kinto a RIGHT JOIN, then a LEFT JOIN that uses the ON condition as b's index range, and b's row is dropped. Found by TLP WHERE. Wrong result.Testing
mvn verify(checkstyle, PMD, formatter) and the unit tests pass.Local trials against 16.1.0-SNAPSHOT at internal 17c453541b, built privately, all sixteen oracles,
--use-reducer, before milestone 18's last two fixes were merged in:Lab:
Lab build ENG-30396: the XCONFLICT oracle, XDCR conflicts on purpose, and ENG-30679 (milestone 38) #37 of
matrix-systemtest-apprunner-sqlancer(branch jobENG-30396-sqlancer-nightly, a replay with this milestone's Jenkinsfile andrun-jenkins-sqlancer-test.sh) passed. It ran fork commit 2c92d4a, the head of milestone 19, with all sixteen oracles, 45 minutes per run:No failed databases, no FATAL lines in server logs, no transient results skipped (ENG-30602).
The runs made about a third fewer queries than milestone 18's (88,512, 151,254 and 90,578). GEO is the cause: it creates, indexes and drops a table on every database, four catalog updates that block the whole cluster. Locally, in 150 seconds on 1 node with 4 threads, the milestone made 7,724 queries without GEO and 4,481 with it (milestone 18: 7,836). Milestone 20 runs GEO on one database in four.