Skip to content

Add SQL DIV function.#16464

Merged
gianm merged 2 commits intoapache:masterfrom
gianm:sql-div
May 17, 2024
Merged

Add SQL DIV function.#16464
gianm merged 2 commits intoapache:masterfrom
gianm:sql-div

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented May 16, 2024

This function has been documented for some time, but lacked a binding, so it wasn't usable.

This function has been documented for some time, but lacked a binding,
so it wasn't usable.
newScanQueryBuilder()
.dataSource(CalciteTests.DATASOURCE1)
.intervals(querySegmentSpec(Filtration.eternity()))
.virtualColumns(expressionVirtualColumn("v0", "div(\"m1\",2)", ColumnType.LONG))
Copy link
Copy Markdown
Contributor

@soumyava soumyava May 16, 2024

Choose a reason for hiding this comment

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

Can we add one more test with div(expression,expression) just for sake of sanity. Rest LGTM

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for taking a look. I added one more doing div(cnt+2, cnt+1).

Copy link
Copy Markdown
Contributor

@soumyava soumyava left a comment

Choose a reason for hiding this comment

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

LGTM !

@gianm
Copy link
Copy Markdown
Contributor Author

gianm commented May 17, 2024

TY for the review!

The IT for cds-task-schema-publish-disabled is failing, but that one has been having such problems recently. I'll merge this anyway.

@gianm gianm merged commit 599586b into apache:master May 17, 2024
@gianm gianm deleted the sql-div branch May 17, 2024 18:11
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants