Skip to content
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

SQL: Add ST_Distance function to geosql #39973

Merged
merged 4 commits into from
Mar 22, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'geosql' into add-st-distance-for-points-only
imotov committed Mar 20, 2019
commit 2face51fc46f8a24777f8c3d2d1b22a116bc59e4
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@
import org.elasticsearch.xpack.sql.SqlIllegalArgumentException;
import org.elasticsearch.xpack.sql.expression.Foldables;
import org.elasticsearch.xpack.sql.expression.Literal;
import org.elasticsearch.xpack.sql.expression.function.scalar.geo.GeoShape;
import org.elasticsearch.xpack.sql.parser.ParsingException;
import org.elasticsearch.xpack.sql.tree.Source;
import org.elasticsearch.xpack.sql.type.DataType;
@@ -409,14 +408,4 @@ public static TemporalAmount negate(TemporalAmount interval) {
public static TemporalAmount parseInterval(Source source, String value, DataType intervalType) {
return PARSERS.get(intervalType).parse(source, value);
}

public static Collection<? extends Entry> getNamedWriteables() {
List<NamedWriteableRegistry.Entry> entries = new ArrayList<>();

entries.add(new Entry(IntervalDayTime.class, IntervalDayTime.NAME, IntervalDayTime::new));
entries.add(new Entry(IntervalYearMonth.class, IntervalYearMonth.NAME, IntervalYearMonth::new));
entries.add(new Entry(GeoShape.class, GeoShape.NAME, GeoShape::new));

return entries;
}
}
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
package org.elasticsearch.xpack.sql.expression.literal;

import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.xpack.sql.expression.function.scalar.geo.GeoShape;

import java.util.ArrayList;
import java.util.Collection;
@@ -30,6 +31,7 @@ public static Collection<? extends NamedWriteableRegistry.Entry> getNamedWriteab

entries.add(new NamedWriteableRegistry.Entry(IntervalDayTime.class, IntervalDayTime.NAME, IntervalDayTime::new));
entries.add(new NamedWriteableRegistry.Entry(IntervalYearMonth.class, IntervalYearMonth.NAME, IntervalYearMonth::new));
entries.add(new NamedWriteableRegistry.Entry(GeoShape.class, GeoShape.NAME, GeoShape::new));

return entries;
}
You are viewing a condensed version of this merge commit. You can view the full changes here.