-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(SchemaViewer): use partitioning keys order from HashColumns #1916
Conversation
f8f630f
to
09d7cf0
Compare
.filter((row): row is WithRequiredFields<SchemaData, 'keyColumnIndex' | 'name'> => | ||
Boolean(row.keyColumnIndex !== undefined && row.keyColumnIndex !== -1 && row.name), | ||
) | ||
.sort((column1, column2) => column1.keyColumnIndex - column2.keyColumnIndex) | ||
.map((row) => row.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update types to remove non-null assertions
.filter((row): row is WithRequiredFields<SchemaData, 'partitioningColumnIndex' | 'name'> => | ||
Boolean( | ||
row.partitioningColumnIndex !== undefined && | ||
row.partitioningColumnIndex !== -1 && | ||
row.name, | ||
), | ||
) | ||
.sort( | ||
(column1, column2) => column1.partitioningColumnIndex - column2.partitioningColumnIndex, | ||
) | ||
.map((row) => row.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented sorting the same way as in getPrimaryKeys
Indexes?: unknown; | ||
Options?: TColumnTableSchemeOptions; | ||
ColumnFamilies?: TFamilyDescription[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated types, set unknown
to types, that are not used currently. The goal was to use backend response as is in tests without any TS errors
it('returns empty array if data is undefined, empty or null', () => { | ||
expect(prepareSchemaData(EPathType.EPathTypeTable, {})).toEqual([]); | ||
expect(prepareSchemaData(EPathType.EPathTypeTable, undefined)).toEqual([]); | ||
expect(prepareSchemaData(EPathType.EPathTypeTable, null)).toEqual([]); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no external tables in our dev clusters and there is no possibility to add them since feature flag is turned off and there is issue with flags. I didn't want to use generated response instead of real backend data, so I left external tables without tests for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Files not reviewed (2)
- src/containers/Tenant/Schema/SchemaViewer/prepareData.ts: Evaluated as low risk
- src/containers/Tenant/Schema/SchemaViewer/types.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/types/api/schema/columnEntity.ts:84
- [nitpick] The use of 'unknown' for 'Indexes' might be too vague. Consider specifying a more concrete type if possible.
Indexes?: unknown;
fixed this test Tenant diagnostics page is visible when describe returns no data |
Closes ydb-platform/ydb#14247
CI Results
Test Status: β FAILED
π Full Report
π No changes in tests. π
Bundle Size: β
Current: 80.20 MB | Main: 80.20 MB
Diff: +0.81 KB (0.00%)
β Bundle size unchanged.
βΉοΈ CI Information