forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove default cases over YBCPgDataType
Summary: Default cases in switch over YBCPgDataType should not exist. When a new type is created, if there is no default case, a compilation error would be thrown so that the author can take a look at the switch and handle it manually. Default cases don't throw compilation error, so a potential bug is more difficult to trace because it may only manifest in runtime. For now, get rid of the default cases for switches on YBCPgDataType only. Don't worry about the other switches. Second, define YB_PG_UNSUPPORTED_TYPES_IN_SWITCH and YB_PG_INVALID_TYPES_IN_SWITCH to reduce duplicate code. Test Plan: jenkins Reviewers: mihnea, neil, smishra Reviewed By: smishra Subscribers: yql, timur Differential Revision: https://phabricator.dev.yugabyte.com/D12646
- Loading branch information
Showing
4 changed files
with
38 additions
and
69 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