-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from 3dcitydb/hotfix-address-join
Remove join with address table in main query
- Loading branch information
Showing
8 changed files
with
100 additions
and
71 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
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 |
---|---|---|
|
@@ -57,7 +57,7 @@ WITH RECURSIVE FEATURE_HIERARCHY AS | |
FROM @[email protected] P | ||
INNER JOIN FEATURE_HIERARCHY H ON H.VAL_FEATURE_ID = P.FEATURE_ID AND H.VAL_RELATION_TYPE = 1 | ||
WHERE NOT IS_CYCLE) | ||
SELECT DISTINCT ON (H.ID) | ||
SELECT | ||
H.ID, | ||
H.FEATURE_ID, | ||
H.PARENT_ID, | ||
|
@@ -97,22 +97,7 @@ SELECT DISTINCT ON (H.ID) | |
F.VALID_TO, | ||
{} AS GEOMETRY, | ||
G.GEOMETRY_PROPERTIES, | ||
G.FEATURE_ID AS GEOMETRY_FEATURE_ID, | ||
A.OBJECTID AS ADDRESS_OBJECTID, | ||
A.IDENTIFIER AS ADDRESS_IDENTIFIER, | ||
A.IDENTIFIER_CODESPACE AS ADDRESS_IDENTIFIER_CODESPACE, | ||
A.STREET, | ||
A.HOUSE_NUMBER, | ||
A.PO_BOX, | ||
A.ZIP_CODE, | ||
A.CITY, | ||
A.STATE, | ||
A.COUNTRY, | ||
A.FREE_TEXT, | ||
{} AS MULTI_POINT, | ||
A.CONTENT, | ||
A.CONTENT_MIME_TYPE | ||
G.FEATURE_ID AS GEOMETRY_FEATURE_ID | ||
FROM FEATURE_HIERARCHY H | ||
LEFT JOIN @[email protected] F ON F.ID = H.VAL_FEATURE_ID | ||
LEFT JOIN @[email protected]_DATA G ON G.ID = H.VAL_GEOMETRY_ID | ||
LEFT JOIN @[email protected] A ON A.ID = H.VAL_ADDRESS_ID |
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
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
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
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
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
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