-
Notifications
You must be signed in to change notification settings - Fork 222
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
ui: Disable tip for sampled queries #1471
base: master
Are you sure you want to change the base?
Conversation
hey @jczhong84 and @zhangvi7 do you know why is sampling rate info piped down from composer to the execution? isn't it available via query meta? https://github.com/pinterest/querybook/pull/1465/files |
@czgu Its used the determine if the currently written query before executing is eligible for sampling based on tables and then decide we to show user tip |
Included bug fix for query composer:
Added getter functions to provide updated values for sampleRate and samplingTables, similar to DataDocQueryCell |
/> | ||
) : null; | ||
const tableSamplingDOM = ( | ||
// !disabled && TABLE_SAMPLING_CONFIG.enabled && hasSamplingTables ? ( |
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.
can we remove those commented out lines if they are not needed
samplingTables[tableName].sample_rate = getSampleRate(); | ||
}); | ||
return samplingTables; | ||
}, [getSampleRate, samplingTables]); |
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.
can these be accommodated into the useTableSampleRate
?
@@ -38,7 +43,7 @@ export const SamplingTooltip: React.FC<SamplingTooltipProps> = ({ | |||
setShowSamplingTip(false); | |||
}; | |||
} | |||
}, [status, id, queryCanBeSampled, delay]); | |||
}, [id, delay, enabled, hasSamplingTables, sampleRate, status]); |
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.
what is this id?
If query is already sampled, we hide the user tip