Skip to content

Add geometry distance operator #1493

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

Merged
merged 2 commits into from
Apr 2, 2022

Conversation

tom-s-powell
Copy link
Contributor

@wumpz wumpz merged commit 98c476a into JSQLParser:master Apr 2, 2022
Copy link
Member

@wumpz wumpz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merged it and corrected the problems. Did you forget to push some commits? I hope this does not offend you, but those problems needed to be addressed.

@@ -3110,6 +3110,8 @@ Expression RegularCondition() #RegularCondition:
| <OP_CONCAT> { result = new JsonOperator("||"); }
| "-" { result = new JsonOperator("-"); }
| "-#" { result = new JsonOperator("-#"); }
| <-> { result = new GeometryDistance("<->"); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you test this line of code? It is definitely wrong. I corrected it.

@@ -586,4 +587,8 @@ public void visit(IsDistinctExpression isDistinctExpression) {
isDistinctExpression.getRightExpression().accept(this);
}

@Override
public void visit(GeometryDistance geometryDistance) {
visitOldOracleJoinBinaryExpression(geometryDistance, " <-> ");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one deparses <#> to <->. I corrected it.

@wumpz
Copy link
Member

wumpz commented Apr 2, 2022

Could you provide an improvement to allow only <-> and <#> as operators. At the moment one could misuse new GeometryDistance("myop").

@tom-s-powell
Copy link
Contributor Author

Thanks for the fixes @wumpz. Is there an ETA on a release that'll include this?

@wumpz
Copy link
Member

wumpz commented Apr 9, 2022

Not yet. Still, there are some issues there. Maybe I will speed up and release earlier.

@wumpz
Copy link
Member

wumpz commented Apr 10, 2022

Now ... I delayed some open issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants