-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andreas Reichel <[email protected]> Signed-off-by: manticore-projects <[email protected]>
- Loading branch information
1 parent
0449077
commit f001573
Showing
3 changed files
with
69 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 9 additions & 1 deletion
10
src/main/resources/ai/starlake/transpiler/JSQLTranspilerMacro.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
CREATE OR REPLACE FUNCTION ifplus(a, b, c) AS CASE a WHEN b THEN b ELSE a + c END; | ||
CREATE OR REPLACE FUNCTION ifplus(a, b, c) AS CASE a WHEN b THEN b ELSE a + c END; | ||
|
||
CREATE OR REPLACE FUNCTION ST_MaxDistance(a, b) AS TABLE | ||
( | ||
SELECT max(ST_DISTANCE_SPHERE(ST_FlipCoordinates(g1.UNNEST.geom), ST_FlipCoordinates(g2.UNNEST.geom))) AS max_distance | ||
FROM | ||
UNNEST(st_dump(st_points(a))) AS g1 | ||
, UNNEST(st_dump(st_points(b))) AS g2 | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters