-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: respect iox::column_type::field metadata when mapping query #200
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #200 +/- ##
==========================================
+ Coverage 89.59% 89.71% +0.12%
==========================================
Files 17 18 +1
Lines 903 963 +60
Branches 137 150 +13
==========================================
+ Hits 809 864 +55
- Misses 38 39 +1
- Partials 56 60 +4 ☔ View full report in Codecov by Sentry. |
src/main/java/com/influxdb/v3/client/internal/InfluxDBClientImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/InfluxDBClientImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/NanosecondConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/InfluxDBClientImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/InfluxDBClientImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/NanosecondConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/NanosecondConverter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VectorSchemaRootConverter
has two similar methods: toPointValues
and setFieldWithMetaType
.
What do you think about reusing the inner part of getArrayObjectFromVectorSchemaRoot
in toPointValues
? We should prepare a helper method to obtain the correctly typed value for each column and reuse this in both methods.
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/NanosecondConverter.java
Outdated
Show resolved
Hide resolved
So with this suggestion, we will not need setFieldWithMetaType, right? |
We can have something like (not production ready, just quick snippet ;)):
and this can be reused:
and with little refactoring also in |
Got it, thank you for your detail snipped Jakub |
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NguyenHoangSon96, thanks for the PR! We’re almost done; there are just a few minor requirements before we can merge it.
src/main/java/com/influxdb/v3/client/internal/NanosecondConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NguyenHoangSon96, thanks again for the PR 👍. There’s one last small requirement, just to make future maintenance easier:
src/main/java/com/influxdb/v3/client/internal/VectorSchemaRootConverter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Closes #
Proposed Changes
Response from the query will now respect the iox::column_type::field metadata
Checklist