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

join.time result is empty #357

Open
wuwenrufeng opened this issue Sep 27, 2022 · 2 comments
Open

join.time result is empty #357

wuwenrufeng opened this issue Sep 27, 2022 · 2 comments
Labels
question Further information is requested

Comments

@wuwenrufeng
Copy link

Specifications

  • Client Version: v2.10.0
  • InfluxDB Version: v.24
  • Platform: unbuntu22.04

Steps to reproduce

1.flux: flux1.flux
`left = from(bucket: "alarm")
|> range(start: -24h)
|> filter(fn: (r) => r._measurement == "alarm" and strings.containsStr(v: r.taskName, substr: "a") and r.error == "type")
|> group()

right = from(bucket: "alarm")
|> range(start: -24h)
|> filter(fn: (r) => r._measurement == "alarm_prevent")
|> group()

joins = join.time(
left: left,
right: right,
as: (l, r) => ({l with expiredField: r.expiredField}),
)
yield joins`
2. flux flux1.flux, it return data
3.result, err := queryAPI.Query(context.Background(), fluxScriptStr); it return empty
...

Expected behavior

return data

Actual behavior

retrun empty

Additional info

No response

@wuwenrufeng wuwenrufeng added the bug Something isn't working label Sep 27, 2022
@vlastahajek
Copy link
Contributor

@wuwenrufeng, does the query returns any data in Data Explorer?
I see you are using the default join method 'inner' (w/o using the method param for join.time), which often leads to an empty result.
If it works OK in Data Explorer, how do you read data using the client? Does the call result.Next() returns false? Do you check result.Err()?

@vlastahajek vlastahajek added the question Further information is requested label Sep 30, 2022
@vlastahajek vlastahajek removed the bug Something isn't working label Oct 26, 2022
@vlastahajek
Copy link
Contributor

@wuwenrufeng, anything new?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants