Skip to content

CDS to DDL: clarify treatment of expressions#2604

Open
stewsk wants to merge 4 commits into
mainfrom
db-xpr
Open

CDS to DDL: clarify treatment of expressions#2604
stewsk wants to merge 4 commits into
mainfrom
db-xpr

Conversation

@stewsk
Copy link
Copy Markdown
Contributor

@stewsk stewsk commented Jun 1, 2026

No description provided.

@stewsk stewsk requested a review from renejeglinsky as a code owner June 1, 2026 14:12
@stewsk stewsk requested a review from danjoa June 1, 2026 14:12
Comment thread guides/databases/cdl-to-ddl.md Outdated
Co-authored-by: René Jeglinsky <rene.jeglinsky@sap.com>
Comment thread guides/databases/cdl-to-ddl.md Outdated
Copy link
Copy Markdown
Member

@danjoa danjoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we have to add this? → should make it more specific as stated generically like that it is also wrong. In particular: Expressions in @assert annotations are database-agnostic, which is done by the respective expression evaluator. Here: the CAP runtimes.
In general: expressions in annotations are rarely evaluated / executed by the compiler. So stating expressions are not agnostic from a compiler-only perspective is misleading.

@stewsk
Copy link
Copy Markdown
Contributor Author

stewsk commented Jun 3, 2026

Why did we have to add this?

because the statement "CDS models are designed to be database-agnostic, " by itself is also misleading. With respect to expressions that makes the impression that one could write any expression and CAP ensures that it translated correctly to the respective database - like in ABAP. This is not true for the compiler, where all expressions are sent to the DB one-to-one, and even the runtimes only provide this service for certain expressions.

(reason for this addendum: there are cap/issues rooted in the expectation that one can just write any expression and that would work)

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.

3 participants