influxdata / influxdb-client-go

InfluxDB 2 Go Client
MIT License
609 stars 116 forks source link

feat: add the ability to query with SQL #370

Closed powersj closed 1 year ago

powersj commented 1 year ago

The latest version of InfluxDB Cloud comes with the ability to send SQL queries. This is done using a new gRPC+TLS client. For now the basic query function will create the different, non-REST client and return an Arrow record slice. Users can then go through that slice as necessary.

codecov-commenter commented 1 year ago

Codecov Report

Base: 92.72% // Head: 91.23% // Decreases project coverage by -1.49% :warning:

Coverage data is based on head (a81453b) compared to base (b0f26e5). Patch coverage: 21.27% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #370 +/- ## ========================================== - Coverage 92.72% 91.23% -1.50% ========================================== Files 23 24 +1 Lines 2242 2283 +41 ========================================== + Hits 2079 2083 +4 - Misses 123 160 +37 Partials 40 40 ``` | [Impacted Files](https://codecov.io/gh/influxdata/influxdb-client-go/pull/370?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata) | Coverage Δ | | |---|---|---| | [api/query\_sql.go](https://codecov.io/gh/influxdata/influxdb-client-go/pull/370?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata#diff-YXBpL3F1ZXJ5X3NxbC5nbw==) | `0.00% <0.00%> (ø)` | | | [client.go](https://codecov.io/gh/influxdata/influxdb-client-go/pull/370?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata#diff-Y2xpZW50Lmdv) | `92.44% <83.33%> (-0.94%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=influxdata)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

powersj commented 1 year ago

Thanks for the review, however I will close this PR.

As-is this PR does not provide anything unique or special over using the Arrow FlightSQL library directly. SQL query support is fundamentally a different animal compared to the existing library and REST support that it provides.