Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsNonEmpty(Intersection()) not returning expected value #553

Open
gsears opened this issue Oct 28, 2021 · 1 comment
Open

IsNonEmpty(Intersection()) not returning expected value #553

gsears opened this issue Oct 28, 2021 · 1 comment

Comments

@gsears
Copy link

gsears commented Oct 28, 2021

Hi all,

Running the following queries in the shell gives an 'unexpected' result:


Let({set: Intersection(
        Match("something_by_someone, Ref(Collection("someone"), "306457654945906882")),
        Match(
          "other_by_something",
          Ref(Collection("something"), "306457726477667522")
        )
      ) }, IsNonEmpty(Var('set')))

false

>> Time elapsed: 68ms

Let({set: Paginate(Intersection(
       Match("something_by_someone, Ref(Collection("someone"), "306457654945906882")),
        Match(
          "other_by_something",
          Ref(Collection("something"), "306457726477667522")
        )
      ) }, IsNonEmpty(Var('set')))

true

>> Time elapsed: 6ms

The only difference being that the second query is paginated. I would imagine IsNonEmpty would work on the set reference provided by the intersection?

Could you clarify if this is a bug or expected? The docs do mention:

The Paginate function executes the Set Reference and returns the results of the Intersect operation in a Page.

I guess it would be nice if IsNonEmpty executed the set as well behind the scenes if this is the case, or if the docs made this explicit.

Thanks for the great software, keep up the great work!

@github-actions
Copy link

Internal ticket number is OSS-972

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

No branches or pull requests

1 participant