Skip to content

Commit

Permalink
Add flink test case
Browse files Browse the repository at this point in the history
  • Loading branch information
iGN5117 committed Jun 24, 2023
1 parent 42951c0 commit 285f7a9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions flink/src/test/java/org/apache/sedona/flink/FunctionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -745,4 +745,14 @@ public void testBoundingDiagonal() {
assertEquals(expected, actual);
}

@Test
public void testAngle() {
Table polyTable = tableEnv.sqlQuery("SELECT ST_Angle(ST_GeomFromWKT('LINESTRING (0 0, 1 1)'), ST_GeomFromWKT('LINESTRING (0 0, 3 2)'))" + " AS " + polygonColNames[0]);
polyTable = polyTable.select(call(Functions.ST_Degrees.class.getSimpleName(), $(polygonColNames[0])));
Double expected = 11.309932474020195;
Double actual = (Double) first(polyTable).getField(0);
assertEquals(expected, actual, 1e-9);

}

}

0 comments on commit 285f7a9

Please sign in to comment.