-
Notifications
You must be signed in to change notification settings - Fork 19
fix: rename countDistinct to countdistinct in allowed functions #211
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: rename countDistinct to countdistinct in allowed functions #211
Conversation
WalkthroughThe change updates the function name key in the allowed functions map from "countDistinct" (camel case) to "countdistinct" (all lowercase) within the query validation logic. This ensures that only the lowercase version is recognized as valid, affecting how function names are checked during query validation. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ValidateQuery
participant allowedFunctions
User->>ValidateQuery: Submit query with function name
ValidateQuery->>allowedFunctions: Check if function name (e.g., "countdistinct") is allowed
allowedFunctions-->>ValidateQuery: Return true if name matches lowercase key
ValidateQuery-->>User: Accept or reject query based on validation
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
TL;DR
We check for allowed lowercased functions so had to change the
countDistinct
function name to lowercasecountdistinct
in the allowed functions map.What changed?
Modified the
allowedFunctions
map ininternal/common/utils.go
to use lowercasecountdistinct
instead of the previously camelCasecountDistinct
. This ensures consistent naming convention for function names.How to test?
countdistinct
function continues to work properlyWhy make this change?
This change standardizes the function naming convention to use all lowercase for function names in the
allowedFunctions
map. This improves consistency with other function names and likely fixes case-sensitivity issues when these function names are used in queries or API calls.Summary by CodeRabbit