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

SQL Error with metabase #8201

Open
itestyoy opened this issue Apr 29, 2024 · 0 comments
Open

SQL Error with metabase #8201

itestyoy opened this issue Apr 29, 2024 · 0 comments
Assignees
Labels
api:sql Issues related to SQL API backend:cubesql bug Something isn't working

Comments

@itestyoy
Copy link

Hi! When we started using Metabase 0.49.7, we began encountering an error with our queries. What does this error mean?

{
  "sql": "SELECT     tmp.TABLE_CAT,     tmp.TABLE_SCHEM,     tmp.TABLE_NAME,     tmp.NON_UNIQUE,     tmp.INDEX_QUALIFIER,     tmp.INDEX_NAME,     tmp.TYPE,     tmp.ORDINAL_POSITION,     trim(both '\"' from pg_catalog.pg_get_indexdef(tmp.CI_OID, tmp.ORDINAL_POSITION, false)) AS COLUMN_NAME,   CASE tmp.AM_NAME     WHEN 'btree' THEN CASE tmp.I_INDOPTION[tmp.ORDINAL_POSITION - 1] & 1::smallint       WHEN 1 THEN 'D'       ELSE 'A'     END     ELSE NULL   END AS ASC_OR_DESC,     tmp.CARDINALITY,     tmp.PAGES,     tmp.FILTER_CONDITION FROM (SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM,   ct.relname AS TABLE_NAME, NOT i.indisunique AS NON_UNIQUE,   NULL AS INDEX_QUALIFIER, ci.relname AS INDEX_NAME,   CASE i.indisclustered     WHEN true THEN 1    ELSE CASE am.amname       WHEN 'hash' THEN 2      ELSE 3    END   END AS TYPE,   (information_schema._pg_expandarray(i.indkey)).n AS ORDINAL_POSITION,   ci.reltuples AS CARDINALITY,   ci.relpages AS PAGES,   pg_catalog.pg_get_expr(i.indpred, i.indrelid) AS FILTER_CONDITION,   ci.oid AS CI_OID,   i.indoption AS I_INDOPTION,   am.amname AS AM_NAME FROM pg_catalog.pg_class ct   JOIN pg_catalog.pg_namespace n ON (ct.relnamespace = n.oid)   JOIN pg_catalog.pg_index i ON (ct.oid = i.indrelid)   JOIN pg_catalog.pg_class ci ON (ci.oid = i.indexrelid)   JOIN pg_catalog.pg_am am ON (ci.relam = am.oid) WHERE true  AND n.nspname = 'public' AND ct.relname = 'calendar') AS tmp ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION "
}
{
  "securityContext": {},
  "appName": "Metabase v0.49.7 [e5c35f15-2ae1-400d-b22a-f065f293da0a]",
  "protocol": "postgres",
  "apiType": "sql"
} 
Error during processing PostgreSQL message: CubeError: Error during planning: The expression to get an indexed field is only valid for `List` and `Struct` types, actual: Utf8

v0.35.22

@itestyoy itestyoy added the question The issue is a question. Please use Stack Overflow for questions. label Apr 29, 2024
@ovr ovr added bug Something isn't working backend:cubesql api:sql Issues related to SQL API and removed question The issue is a question. Please use Stack Overflow for questions. labels Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:sql Issues related to SQL API backend:cubesql bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants