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

Wrong behavior of coalesce() #4213

Closed
randomJoe211 opened this issue Apr 28, 2022 · 3 comments
Closed

Wrong behavior of coalesce() #4213

randomJoe211 opened this issue Apr 28, 2022 · 3 comments
Labels
type/bug Type: something is unexpected
Milestone

Comments

@randomJoe211
Copy link
Contributor

Describe the bug (required)

The coalesce() function cannot return the first non-null element in a list.

image

nGQL:

WITH [NULL, 4923, 'abc', 521, 487] AS ids RETURN coalesce(ids);

Your Environments (required)

  • OS: ubuntu 20.04
  • Nebual Graph version: 3.1.0
    image
@randomJoe211 randomJoe211 added the type/bug Type: something is unexpected label Apr 28, 2022
@randomJoe211 randomJoe211 changed the title Wrong behavior of Wrong behavior of coalesce() Apr 28, 2022
@Sophie-Xie Sophie-Xie added this to the v3.2.0 milestone Apr 28, 2022
@CPWstatic CPWstatic removed their assignment Jun 7, 2022
@czpmango
Copy link
Contributor

czpmango commented Jun 7, 2022

The function coalesce() returns the first non-null value in the given list of expressions not in the given list.

@czpmango
Copy link
Contributor

czpmango commented Jun 7, 2022

(root@nebula) [nba]> WITH [NULL, 4923, 'abc', 521, 487] AS list1 RETURN head([x in list1 where x is not null | x])
+----------------------------------------------------------------+
| head([__VAR_0 IN list1 WHERE $__VAR_0 IS NOT NULL | $__VAR_0]) |
+----------------------------------------------------------------+
| 4923                                                           |
+----------------------------------------------------------------+

@czpmango
Copy link
Contributor

czpmango commented Jun 7, 2022

Closed but free to ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Type: something is unexpected
Projects
None yet
Development

No branches or pull requests

4 participants