You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Changing arcadedb.dateImplementation silently invalidates every REGEXP already declared on a DATE or DATETIME property, and every later write of it fails #9976
Body:
A REGEXP on a DATE or DATETIME property is now checked at declaration time against the texts a value
of that type can be written as, and the text form depends on the class the database holds the value
as: the refusal message says so, naming it ("a value of DATE (held as LocalDate)"). The check is
correct at the moment of the declaration.
ALTER DATABASE \arcadedb.dateImplementation`` changes that class for the whole database, and
nothing re-checks the patterns already declared. A pattern that was accepted, and that was right for
the class in force when it was accepted, now matches nothing - and every write of the property fails
from that point on, which is the outcome the declaration-time check exists to prevent.
Reproduced, embedded, against a build of today's main:
CREATE VERTEX TYPE R1;
CREATE PROPERTY R1.d DATE (regexp '[0-9]{4}-[0-9]{2}-[0-9]{2}'); -- accepted (held as LocalDate)
INSERT INTO R1 SET d = date('2024-01-15','yyyy-MM-dd'); -- OK
ALTER DATABASE `arcadedb.dateImplementation` 'java.util.Date'; -- accepted, says nothing
R1.d regexp is still '[0-9]{4}-[0-9]{2}-[0-9]{2}'
INSERT INTO R1 SET d = date('2024-02-20','yyyy-MM-dd');
ValidationException: The property 'R1.d' does not match the regular expression
'[0-9]{4}-[0-9]{2}-[0-9]{2}'. Field value is: Tue Feb 20 00:00:00 WET 2024
Nothing was said at the ALTER DATABASE, and the property's declaration is untouched, so the
schema still reads as if the constraint were satisfiable.
Suggested fix: the predicate is already written and already takes the database that decides the
class. When dateImplementation (and dateTimeImplementation) changes, walk the DATE/DATETIME
properties once and re-run DocumentValidator.regexpUsability against the NEW class: refuse the ALTER DATABASE naming the properties that would become unsatisfiable, or - if refusing a database
setting over a property constraint is judged too strong - log one WARNING per property, naming it,
the new holding class and ALTER PROPERTY ... REGEXP null, which is what the declaration-time path
already does for an undecided pattern. A Calendar-held date has no text form entry
(DocumentValidator.textForm answers null for it) and so is not checked at declaration time either;
the same walk would be the place to say so.
DocumentValidator.unreadableBound, the MIN/MAX twin, takes the same database argument and so
reads the same holding class; whether a bound accepted under one implementation can become
unreadable under another was not established here, but the same walk would be the place to settle
it.
ALTER DATABASE `arcadedb.dateImplementation` (and dateTimeImplementation) is now refused when a REGEXP already declared on a DATE/DATETIME property would match no value written with the new class. The error names the properties: remove or adjust the pattern first (ALTER PROPERTY ... REGEXP null). A java.util.Calendar implementation is checked too.
The same applies to arcadedb.dateFormat / arcadedb.dateTimeFormat: a change is refused if it would make an existing MIN or MAX of a date property unreadable.
❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
Activity
fix(#9976,#9990): date constraint checks run under the write lock wit…
fix(#9976): a setting whose side effect fails is put back (review)
fix(#9976): one search deadline for the whole date-setting walk under…
fix(#9976): one mapping of the date types the implementation settings…
Merge pull request #10011 from ArcadeData/fix/9990-9991-9976-9989-999…
lvca commentedon Oct 14, 2026
Fixed in #10011 (release 26.11.1).
ALTER DATABASE `arcadedb.dateImplementation`(anddateTimeImplementation) is now refused when a REGEXP already declared on a DATE/DATETIME property would match no value written with the new class. The error names the properties: remove or adjust the pattern first (ALTER PROPERTY ... REGEXP null). Ajava.util.Calendarimplementation is checked too.The same applies to
arcadedb.dateFormat/arcadedb.dateTimeFormat: a change is refused if it would make an existing MIN or MAX of a date property unreadable.❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.
fix(ArcadeData#9990,ArcadeData#9991,ArcadeData#9976,ArcadeData#9989,A…
fix(#9949): set database setting re-derives the serializer and statem…
fix(#9990,#9991,#9976,#9989,#9992): one authority decides which REGEX…
fix(#9976,#9990): date constraint checks run under the write lock wit…
fix(#9976): a setting whose side effect fails is put back (review)
fix(#9976): one search deadline for the whole date-setting walk under…
fix(#9976): one mapping of the date types the implementation settings…
fix(#9949): set database setting re-derives the serializer and statem…