-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Geo spatial: 3. geography schema, data, index and optimization #3043
Geo spatial: 3. geography schema, data, index and optimization #3043
Conversation
9306497
to
8aeedd9
Compare
aaa81ca
to
e30c3f5
Compare
00a2d27
to
5ff3dbc
Compare
66d0471
to
3354f42
Compare
68e597d
to
7b1b40a
Compare
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.
I have reviewed the storage part, it is ok to return std::vector
for vertexIndexKeys
and edgeIndexKeys
, maybe some perf regression, but it is ok.
DCHECK(!hasGeo || cols.size() == 1); | ||
std::vector<std::string> indexes; | ||
|
||
if (!hasGeo) { |
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.
Add a LIKELY
here.
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.
I think it might not be good to add LIKELY here, because there is no way to know the user scenario, for example, the user may use nebula as a geospatial database, so all the indexes are geography indexes
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.
👌
7b1b40a
to
a1899bc
Compare
When I first implemented it, I did implement it separately: return vector for geography, return a single string for other datatypes. But I feel it makes the code less readable, and when we later support joint index of geo with other datatypes, which will also need to return a vector, this will lead to increased code complexity. So I change it to make them all return vector. There may be a bit of performance overhead to return a vector for all, we could do some perf regression. @FangJinhe @Sophie-Xie |
a1899bc
to
bc45f3f
Compare
bc45f3f
to
4674a48
Compare
66733c9
to
2940bdc
Compare
2940bdc
to
fee8db2
Compare
4b6f4bf
to
a4afcc7
Compare
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.
Good job~
* Geo spatial: 3. geography data and index
* Fixed an issue where the server still started with a wrong ip/host (#3057) * Fix wrong local ip. * Address comment. * Fix alter drop (#3036) * disable modify same col * add test case * refactor ddl * fix pytest error * address comment Co-authored-by: Yee <[email protected]> * fix fetch vertex properties(vertex) bug (#3120) * fix fetch vertex properties(vertex) bug * address comment Co-authored-by: Yee <[email protected]> * fix go yield bug (#3128) * fix go yield bug * add test case * Remove unnecessary check (#3112) Co-authored-by: cpw <[email protected]> Co-authored-by: Yee <[email protected]> * fix go mTOn filter bug (#3144) * fix go mTOn filter bug * add test case * Geo spatial: 3. geography schema, data, index and optimization (#3043) * Geo spatial: 3. geography data and index Co-authored-by: cpw <[email protected]> Co-authored-by: jimingquan <[email protected]> Co-authored-by: Yee <[email protected]> Co-authored-by: Yichen Wang <[email protected]> Co-authored-by: jie.wang <[email protected]>
Are multipart geometrical datatypes (MultiPoint, MultiLineString, MultiPolygon) supported at the moment? If not, are there any plans for them? |
Hi @ZOUG , Sorry for the late reply. We just support Point, LineString and Polygon currently. By the way, geo really involves a lot of things. At present, we have only implemented part of the core feature. |
if (static_cast<ListExpression*>(inExpr->right())->size() > 1) { | ||
return TransformResult::noTransform(); | ||
} else { | ||
transformedExpr = graph::ExpressionUtils::rewriteInExpr(condition); |
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.
Line 133 is a bug.
Close #2595
TODO:
CREATE TAG INDEX geo_index on shape(geo) s2_min_level = 0, s2_max_level=30, s2_max_cells=8
The joint index could only have one geography field and it must be at the end.
(For the time reason, we only support create a single index on a geography column)
MATCH
. I have only done it forLOOKUP
currently.This could be done after the index selection and index optimization are done.
(For
MATCH
, geo predicate index will not apply to its where clause currently, it will degenerate toIndexFullScan
+Filter
;)GeoIndex::coveredBy