Reuse ClickHouse SELECT statements (#4482)

This commit is contained in:
Kamil Kisiela 2024-05-20 10:22:22 +02:00 committed by GitHub
parent 38b888d148
commit d40d548d0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 404 additions and 753 deletions

View file

@ -24,7 +24,6 @@ const rulesToExtends = Object.fromEntries(
'no-lonely-if',
'unicorn/prefer-includes',
'react/self-closing-comp',
'prefer-const',
'no-extra-boolean-cast',
].includes(key),
),
@ -126,6 +125,7 @@ module.exports = {
...rulesToExtends,
'no-restricted-syntax': ['error', ...HIVE_RESTRICTED_SYNTAX, ...RESTRICTED_SYNTAX],
'prefer-destructuring': 'off',
'prefer-const': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
// 🚨 The following rules needs to be fixed and was temporarily disabled to avoid printing warning

View file

@ -12,7 +12,7 @@ type JoinValue = {
readonly values: ReadonlyArray<SqlValue | string>;
};
type RawValue = {
export type RawValue = {
readonly kind: 'raw';
readonly sql: string;
};

View file

@ -228,7 +228,7 @@ function DeprecatedSchemaExplorer(props: {
</div>
<div className="flex justify-end gap-x-2">
<DateRangePicker
validUnits={['y', 'M', 'w', 'd']}
validUnits={['y', 'M', 'w', 'd', 'h']}
selectedRange={dateRangeController.selectedPreset.range}
startDate={dateRangeController.startDate}
align="end"

View file

@ -226,7 +226,7 @@ function UnusedSchemaExplorer(props: {
</div>
<div className="flex justify-end gap-x-2">
<DateRangePicker
validUnits={['y', 'M', 'w', 'd']}
validUnits={['y', 'M', 'w', 'd', 'h']}
selectedRange={dateRangeController.selectedPreset.range}
startDate={dateRangeController.startDate}
align="end"

View file

@ -104,7 +104,7 @@ function ClientView(props: {
</div>
<div className="flex justify-end gap-x-2">
<DateRangePicker
validUnits={['y', 'M', 'w', 'd']}
validUnits={['y', 'M', 'w', 'd', 'h']}
selectedRange={dateRangeController.selectedPreset.range}
startDate={dateRangeController.startDate}
align="end"

View file

@ -126,7 +126,7 @@ function SchemaCoordinateView(props: {
</div>
<div className="flex justify-end gap-x-2">
<DateRangePicker
validUnits={['y', 'M', 'w', 'd']}
validUnits={['y', 'M', 'w', 'd', 'h']}
selectedRange={dateRangeController.selectedPreset.range}
startDate={dateRangeController.startDate}
align="end"