Skip to content

[Bug]: Inconsistent Case Handling for Parameter Names in SQL Parser #49

@pankaj-bind

Description

@pankaj-bind

Description

There is an inconsistency in how the mindsdb_sql_parser handles the case of parameter keys (e.g., in USING or SET clauses) across different SQL statements.

Some AST nodes, such as CreateKnowledgeBase and EvaluateKnowledgeBase, normalize parameter keys to lowercase. For example, in mindsdb_sql_parser/parser.py, the implementation is:
params = {k.lower(): v for k, v in params.items()}

However, this behavior is not consistently applied. Other important AST nodes, such as CreateSkill, CreateAgent, and CreateChatbot, do not perform this case normalization and preserve the original casing of the parameter keys.

This leads to unpredictable behavior, where some parameters are case-insensitive while others are case-sensitive.

Impact

This inconsistency can cause downstream bugs and runtime errors. Applications built on top of the parser may expect case-insensitive keys (which is standard for SQL) and fail when they encounter case-sensitive ones. This makes the system less reliable and harder to debug for developers who are unaware of this specific behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions