Skip to content

Commit

Permalink
Fix maxRowsInMemory default for streaming (apache#17028)
Browse files Browse the repository at this point in the history
* fix maxRowsInMemory

* fix button css
  • Loading branch information
vogievetsky authored Sep 11, 2024
1 parent 5de8425 commit 9e1544e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions web-console/src/components/auto-form/auto-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface Field<M> {
| 'json'
| 'interval'
| 'custom';
defaultValue?: any;
defaultValue?: Functor<M, any>;
emptyValue?: any;
suggestions?: Functor<M, Suggestion[]>;
placeholder?: Functor<M, string>;
Expand Down Expand Up @@ -131,7 +131,9 @@ export class AutoForm<T extends Record<string, any>> extends React.PureComponent
const required = AutoForm.evaluateFunctor(field.required, model, false);
return {
required,
defaultValue: required ? undefined : field.defaultValue,
defaultValue: required
? undefined
: AutoForm.evaluateFunctor(field.defaultValue, model as any, undefined),
modelValue: deepGet(model as any, field.name),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ const TUNING_FORM_FIELDS: Field<IngestionSpec>[] = [
{
name: 'spec.tuningConfig.maxRowsInMemory',
type: 'number',
defaultValue: 1000000,
defaultValue: (spec: IngestionSpec) => (isStreamingSpec(spec) ? 150000 : 1000000),
info: <>Used in determining when intermediate persists to disk should occur.</>,
},
{
Expand Down
5 changes: 5 additions & 0 deletions web-console/src/entry.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ body {
}
}

// Make segmented control buttons appear blue when they are primary
.#{$bp-ns}-segmented-control > .#{$bp-ns}-button.#{$bp-ns}-small.#{$bp-ns}-intent-primary {
color: $blue5;
}

// Prevent popover menus from being longer than 45% of available height, let them scroll instead
.#{$bp-ns}-popover-content > .#{$bp-ns}-menu {
max-height: 47vh;
Expand Down

0 comments on commit 9e1544e

Please sign in to comment.