-
Notifications
You must be signed in to change notification settings - Fork 319
feat: introduce json filter keys via dynamic column metadata #1260
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 4d36473 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Code Review: JSON Filter Keys via Dynamic Column MetadataThanks for this PR! This is an interesting approach to re-enable JSON filter keys by querying ClickHouse system tables instead of scanning the actual data. I've identified several issues and concerns that should be addressed: 🔴 Critical Issues1. Hardcoded Database Name Assumptionconst decodedKey = decodeURIComponent(row.encoded_key);
keys.push({
key: decodedKey.slice(
`${column}.`.length,
decodedKey.lastIndexOf('.dynamic_structure'),
),
chType: 'String',
}); Problem: The code assumes the substream format is exactly Recommendation:
2. Incomplete Filter Key Escaping in Frontendkeys: [
key
.split('.')
.map(v => `\`${v}\``)
.join('.'),
], Problem: This escaping logic only handles dots in key names, but doesn't account for:
Recommendation: keys: [
key
.split('.')
.filter(v => v.length > 0) // Filter empty segments
.map(v => `\`${v.replace(/`/g, '\\`')}\``) // Escape existing backticks
.join('.'),
], 3. Missing Test CoverageThe Recommendation: Add comprehensive tests covering:
|
E2E Test Results❌ 1 test failed • 23 passed • 3 skipped • 416s
|
No description provided.