Skip to content

Comments

Java: Numeric Type Promotion#2224

Merged
renejeglinsky merged 13 commits intomainfrom
java-type-promotion
Dec 3, 2025
Merged

Java: Numeric Type Promotion#2224
renejeglinsky merged 13 commits intomainfrom
java-type-promotion

Conversation

@MattSchur
Copy link
Contributor

No description provided.

@MattSchur MattSchur requested a review from smahati as a code owner November 21, 2025 12:26
@MattSchur MattSchur requested a review from agoerler November 21, 2025 12:26
Copy link
Contributor

@agoerler agoerler left a comment

Choose a reason for hiding this comment

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

I think we should also document type promotion of functions

agoerler and others added 2 commits November 24, 2025 13:55
Co-authored-by: Matthias Schur <107557548+MattSchur@users.noreply.github.com>
@MattSchur MattSchur requested a review from agoerler November 24, 2025 16:09
Copy link
Contributor

@agoerler agoerler left a comment

Choose a reason for hiding this comment

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

We need to decide wether we use CDS type names Int32 or hana.Real or the constants of CdsBaseType. As we don't mention the CAP Java's CdsBaseType yet ion the documentation we could stick to the CDS type names.

Or we extend the table https://pages.github.tools.sap/cap/docs/java/cds-data#predefined-types and the table for the HANA types with a column for the CdsBaseType names.

Co-authored-by: Adrian Görler <adrian.goerler@sap.com>
@MattSchur MattSchur requested a review from agoerler November 26, 2025 14:27
@renejeglinsky renejeglinsky added the AI Review AI generated suggestions label Nov 26, 2025
@renejeglinsky renejeglinsky removed the AI Review AI generated suggestions label Nov 26, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Here's a supportive code review enhanced by AI assistance. These insights offer suggestions and observations that may help guide your development process. Please consider them as recommendations rather than definitive requirements. Your expertise and judgment remain the most important factors in making decisions about your code. The AI analysis is simply here to provide additional perspective and support your work.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 1463 | Completion Tokens: 384

java/cds-data.md Outdated
- **ceiling(x)**, **floor(x)**, **round(x)**: Return the same type as the input `x`.
- **min(x)**, **max(x)**, **sum(x)**: Aggregate functions return the same type as the argument `x`.
- **average(x)**: Returns `cds.Decimal` for exact numeric types and `cds.Double` for approximate numeric types.
- **count(x)**, **countdistinct(x)**: return `cds.Int64`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Capitalize "Return" to maintain consistency with the capitalization pattern used in other function descriptions:

- **count(x)**, **countdistinct(x)**: Return `cds.Int64`.

@renejeglinsky renejeglinsky merged commit 6c504ad into main Dec 3, 2025
8 checks passed
@renejeglinsky renejeglinsky deleted the java-type-promotion branch December 3, 2025 10:01
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.

4 participants