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

Redis tableName should be case-sensitive #3999

Open
dekelev opened this issue Jun 11, 2020 · 1 comment
Open

Redis tableName should be case-sensitive #3999

dekelev opened this issue Jun 11, 2020 · 1 comment

Comments

@dekelev
Copy link

dekelev commented Jun 11, 2020

When configuring Redis tableName option, upper-case chars are automatically treated as lower-case, so only lower-case keys are found when querying the table.

For example, I have 2 keys in Redis:

  1. Test:1 with value 1
  2. test:2 with value 2

redis/test.json

{
    "tableName": "Test",
    "schemaName": "default",
    "key": {
        "dataFormat": "raw",
        "fields": [
            {
                "name": "id",
                "mapping": "5",
                "type": "VARCHAR"
            }
        ]
    },
    "value": {
        "dataFormat": "raw",
        "fields": [
            {
                "name": "col",
                "type": "VARCHAR"
            }
        ]
    }
}

redis.properties

connector.name=redis
redis.table-names=Test
redis.database-index=0
redis.nodes=localhost:6379
redis.key-prefix-schema-table=true

Query

SELECT * FROM redis.default.test;

Problem: Only the second (lower-case) key will be returned.

Presto v334
Redis v4.0.11

@findepi
Copy link
Member

findepi commented Jun 11, 2020

Currently, all schema, table and column names in Presto are always lowercase.
We are working on getting this right under #17.
Before that is completed, there is unfortunately no way to access redis "tables" that differ in case only.

If the name is not in lower-case, and an all-lower-case name does not exist, it is still possible to do a match,
and we do so in a bunch of connectors (probably not in Redis).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants