Skip to content
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: include lower-case identifiers among those that need quotes (#3723) #5139

Commits on Apr 22, 2020

  1. fix: include lower-case identifiers among those that need quotes (con…

    …fluentinc#3723)
    
    IdentifierUtils::needsQuotes is used by various code that formats SQL text to
    decide what identifiers to wrap in quotes. Before this change, this just included
    reserved identifiers. However, identifiers that include lower-case characters should
    also be quoted. Otherwise, when the parser parses them it will convert them to
    upper-case. So this patch changes needsQuotes to check for lower-case characters.
    
    For schema inference, we don't want to quote column names generated from lower-case
    avro schema fields. To handle this, this patch adds IdentifierUtils.isValid, that
    only returns true if the identifier is valid (parsable). Schema inference uses this
    to only quote invalid identifiers.
    rodesai authored and stevenpyzhang committed Apr 22, 2020
    Configuration menu
    Copy the full SHA
    219dbce View commit details
    Browse the repository at this point in the history