Skip to content

Conversation

@Amaneusz
Copy link
Contributor

No description provided.

@Amaneusz Amaneusz marked this pull request as ready for review September 15, 2025 11:51
// for tags without values we can utilize top-level-key based '?&' operand
// https://www.postgresql.org/docs/current/functions-json.html#FUNCTIONS-JSONB-OP-TABLE
resolveTagNamesArrayOperation(
jsonbOperator = "jsonb_exists_all", // equivalent of '?&'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think if we will get empty list (is it possible?) any will return false but all will return true. Is it behavior we want?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to worry here :)

I think if we will get empty list (is it possible?)

It is not. See the function that guards the entrance to this call

private fun containsOnlyTagExists(container: ListProxy<ITagQuery>): Boolean =
    container.all { it is TagExists }

this predicate won't hold on empty list.

@Amaneusz Amaneusz merged commit a7aa604 into v3 Sep 17, 2025
3 checks passed
@Amaneusz Amaneusz deleted the v3_CASL-1067_tag_query_index_analysis branch September 17, 2025 07:14
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