Skip to content

Update bookstore functions for function optionality changes#43

Open
krishnangovindraj wants to merge 4 commits into
masterfrom
update-bookstore-for-optionality
Open

Update bookstore functions for function optionality changes#43
krishnangovindraj wants to merge 4 commits into
masterfrom
update-bookstore-for-optionality

Conversation

@krishnangovindraj
Copy link
Copy Markdown
Member

Product change and motivation

Updates bookstore functions for function optionality changes (typedb/typedb#7730)

@krishnangovindraj krishnangovindraj changed the title aUpdate bookstore functions for function optionality changes Update bookstore functions for function optionality changes May 6, 2026
return { $line-total };

fun best_discount_for_item($item: book, $order-time: datetime) -> double:
fun best_discount_for_item($item: book, $order-time: datetime) -> double?:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is odd. At first reading if $inclusion has discount $discount-attr fails to match then $discount gets set to 0.0. So surely $discount consistently ends up set to a double here, thus max($discount) is also consistently a double? Why does it need to be optional?

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.

2 participants