Summary
Both documentation repos show CURRENT_TIMESTAMP as a column DEFAULT in a CREATE TABLE. It does not parse. The grammar takes _ingest.timestamp.
Reproduce
CREATE TABLE t (id INT, createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
-- ParserError(')' expected but 'D' found)
CREATE TABLE t (id INT, createdAt TIMESTAMP DEFAULT _ingest.timestamp);
-- OK
Isolated: the failure is specific to CURRENT_TIMESTAMP in the DEFAULT position. KEYWORD DEFAULT 'pending' and VARCHAR DEFAULT 'anonymous' both parse, so DEFAULT itself is fine.
Where
| repo |
file |
line |
| SoftClient4ES |
documentation/sql/materialized_views.md |
401 |
| softclient4es-web |
src/content/docs/sql/materialized-views.mdx |
223 |
Both read createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP, inside an otherwise valid CREATE TABLE.
Why these two are the outliers
The grammar accepts value | ingest_id | ingest_timestamp, where ingest_timestamp is the literal _ingest.timestamp (sql/.../parser/type/package.scala:103).
Everywhere else already uses the correct form:
documentation/sql/dql_statements.md — 4 occurrences of DEFAULT _ingest.timestamp
core/src/main/resources/help/commands/ddl/create_table.json — 4 occurrences, zero CURRENT_TIMESTAMP
So this is two stray lines, not a systemic misunderstanding.
Note CURRENT_TIMESTAMP is valid as an expression (SELECT CURRENT_TIMESTAMP, WHERE … >= DATE_SUB(CURRENT_TIMESTAMP, …)) — those uses are correct and should not be touched. It is only invalid in the DEFAULT position.
Suggested fix
Replace with DEFAULT _ingest.timestamp in both files. Verified: the full materialized-view CREATE TABLE example parses once that single token is changed.
How it was found
Parse-probing every SQL example in the web documentation through Parser.apply (120 statements). Filed rather than fixed inline at the maintainer's request.
Summary
Both documentation repos show
CURRENT_TIMESTAMPas a columnDEFAULTin aCREATE TABLE. It does not parse. The grammar takes_ingest.timestamp.Reproduce
Isolated: the failure is specific to
CURRENT_TIMESTAMPin theDEFAULTposition.KEYWORD DEFAULT 'pending'andVARCHAR DEFAULT 'anonymous'both parse, soDEFAULTitself is fine.Where
documentation/sql/materialized_views.mdsrc/content/docs/sql/materialized-views.mdxBoth read
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,inside an otherwise validCREATE TABLE.Why these two are the outliers
The grammar accepts
value | ingest_id | ingest_timestamp, whereingest_timestampis the literal_ingest.timestamp(sql/.../parser/type/package.scala:103).Everywhere else already uses the correct form:
documentation/sql/dql_statements.md— 4 occurrences ofDEFAULT _ingest.timestampcore/src/main/resources/help/commands/ddl/create_table.json— 4 occurrences, zeroCURRENT_TIMESTAMPSo this is two stray lines, not a systemic misunderstanding.
Note
CURRENT_TIMESTAMPis valid as an expression (SELECT CURRENT_TIMESTAMP,WHERE … >= DATE_SUB(CURRENT_TIMESTAMP, …)) — those uses are correct and should not be touched. It is only invalid in theDEFAULTposition.Suggested fix
Replace with
DEFAULT _ingest.timestampin both files. Verified: the full materialized-viewCREATE TABLEexample parses once that single token is changed.How it was found
Parse-probing every SQL example in the web documentation through
Parser.apply(120 statements). Filed rather than fixed inline at the maintainer's request.