-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the support of OPTIMIZE expression
- Loading branch information
Showing
7 changed files
with
578 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- Origin SQL: | ||
OPTIMIZE TABLE table DEDUPLICATE; -- all columns | ||
OPTIMIZE TABLE table DEDUPLICATE BY *; -- excludes MATERIALIZED and ALIAS columns | ||
OPTIMIZE TABLE table DEDUPLICATE BY colX,colY,colZ; | ||
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT colX; | ||
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT (colX, colY); | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex'); | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT colX; | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT (colX, colY); | ||
|
||
-- Format SQL: | ||
OPTIMIZE TABLE table DEDUPLICATE; | ||
OPTIMIZE TABLE table DEDUPLICATE BY *; | ||
OPTIMIZE TABLE table DEDUPLICATE BY colX, colY, colZ; | ||
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT colX; | ||
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT (colX, colY); | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex'); | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT colX; | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT (colX, colY); |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
OPTIMIZE TABLE table DEDUPLICATE; -- all columns | ||
OPTIMIZE TABLE table DEDUPLICATE BY *; -- excludes MATERIALIZED and ALIAS columns | ||
OPTIMIZE TABLE table DEDUPLICATE BY colX,colY,colZ; | ||
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT colX; | ||
OPTIMIZE TABLE table DEDUPLICATE BY * EXCEPT (colX, colY); | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex'); | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT colX; | ||
OPTIMIZE TABLE table DEDUPLICATE BY COLUMNS('column-matched-by-regex') EXCEPT (colX, colY); |
Oops, something went wrong.