And this would apply as well to containers or streams of local objects. The Downsampling example encourages the use of PointValues when dealing with query results, however sticking to translations between just Point and LocalType is semantically simpler and cleaner. Since downsampling involves writing data back to the server and the write API uses Points, it would be handy to work directly with Points from query results, without exposing underlying PointValues.
Granted such a method could entail a slight performance hit, so this is not to suggest that the current approach should be entirely replaced.
Expected behavior
Since the Point type is preferred in the Write API it should also be easy to work with in the QueryAPI and this would include containers or streams of Point.
Actual behavior
The Query API's QueryIterator has a method AsPoints that returns *PointValues. This of course is not a Point container or stream. Furthermore it gives precedent to the PointValue type, which in the WriteAPI is hidden within Point
Use Case
It seems that a common idiom in some implementations is translating from a local type to
Point
and vice versa.e.g.
And this would apply as well to containers or streams of local objects. The Downsampling example encourages the use of
PointValues
when dealing with query results, however sticking to translations between justPoint
andLocalType
is semantically simpler and cleaner. Since downsampling involves writing data back to the server and thewrite
API usesPoints
, it would be handy to work directly with Points from query results, without exposing underlyingPointValues
.Granted such a method could entail a slight performance hit, so this is not to suggest that the current approach should be entirely replaced.
Expected behavior
Since the
Point
type is preferred in the Write API it should also be easy to work with in the QueryAPI and this would include containers or streams ofPoint
.Actual behavior
The Query API's
QueryIterator
has a methodAsPoints
that returns*PointValues
. This of course is not aPoint
container or stream. Furthermore it gives precedent to thePointValue
type, which in the WriteAPI is hidden withinPoint
Additional info
No response