Implement support for ValueType VALUE_POINT.#45
Open
mitchsw wants to merge 3 commits intoRedisGraph:masterfrom
Open
Implement support for ValueType VALUE_POINT.#45mitchsw wants to merge 3 commits intoRedisGraph:masterfrom
mitchsw wants to merge 3 commits intoRedisGraph:masterfrom
Conversation
Currently, returning a point fails to parse. RedisGraph implements this value type as a 2-element array (see _ResultSet_CompactReplyWithPoint). In this client implementation, I parse that into a 2-element map[string]float64.
mitchsw
commented
May 11, 2021
Author
|
Please take a look @filipecosta90 |
| func (qr *QueryResult) parsePoint(cell interface{}) map[string]float64 { | ||
| point := make(map[string]float64) | ||
| var array = cell.([]interface{}) | ||
| if len(array) == 2 { |
Contributor
There was a problem hiding this comment.
This condition should always be true, but there is no harm in checking for it.
jeffreylovitz
previously approved these changes
Jun 11, 2021
Contributor
jeffreylovitz
left a comment
There was a problem hiding this comment.
This looks great, thank you for the contribution!
jeffreylovitz
approved these changes
Jun 11, 2021
filipecosta90
approved these changes
Jun 16, 2021
Contributor
|
@mitchsw Sorry for the delay, we had a hiccup with our CI testing! Would you mind making a new commit through a command like That should re-trigger our CI and allow us to merge this feature. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, returning a point fails to parse. RedisGraph returns a point as a 2-element double array (see _ResultSet_CompactReplyWithPoint). In this client implementation, I parse those float strings into a 2-element map[string]float64.