-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sorting by fields to SCSI (#101)
* feat: add sorting by fields to SCSI * deprecate finder method and use page count * remove index column and find value type * get value type without querying db * create methods in RecordUtils and specify invalid criterion * add tests and refactor to RecordUtils * check empty sort column and return exception for invalid types * throw unsupported exception for invalid types and support enums * add sorting for array of records * unsupport array and refactor construct sql query * add default value for count * use same finder name
- Loading branch information
Showing
12 changed files
with
469 additions
and
49 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
22 changes: 22 additions & 0 deletions
22
dao-api/src/main/pegasus/com/linkedin/metadata/query/IndexSortCriterion.pdl
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,22 @@ | ||
namespace com.linkedin.metadata.query | ||
|
||
/** | ||
* Sort order along with the aspect and path to sort it on, to be applied to the results. | ||
*/ | ||
record IndexSortCriterion { | ||
|
||
/** | ||
* FQCN of the aspect class in the index table that this criterion refers to e.g. com.linkedin.common.Status | ||
*/ | ||
aspect: string | ||
|
||
/** | ||
* Corresponding path column of the index table that this criterion refers to e.g. /removed (corresponding to field "removed" of com.linkedin.common.Status aspect) | ||
*/ | ||
path: string | ||
|
||
/** | ||
* The order to sort the results i.e. ASCENDING or DESCENDING | ||
*/ | ||
order: SortOrder | ||
} |
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 |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
"boolField": true, | ||
"stringField": "baz", | ||
"longField": 1234, | ||
"intField": 1, | ||
"arrayField": [ | ||
"1", | ||
"2", | ||
|
Oops, something went wrong.