rill icon indicating copy to clipboard operation
rill copied to clipboard

"Conversion Error: Type VARCHAR with value can't be cast to the destination type LIST"

Open ghpu opened this issue 1 year ago • 3 comments

Describe the bug I have a VARCHAR[] column "languages" containing tags like "en", "fr" , with an in-browser duckdb instance.

If I try to use this dimension column either for filtering or for aggregtion,it does't work, and the browser console logs the following error message :

"Conversion Error: Type VARCHAR with value 'en' can't be cast to the destination type LIST"

If used in filtering, no results are returned after filtering. If used for aggregation, an empty grayed list is displayed when opening the group.

Expected behavior Working filtering for VARCHAR[] diemnsions.

Desktop (please complete the following information):

  • OS: [Ubuntu 24.04
  • Browser: Firefox 129.0
  • Version: rill version 0.48.1 (build commit: ca4f66da4 date: 2024-08-09T13:43:51Z)

ghpu avatar Aug 12 '24 08:08 ghpu

The problem seems to arise only in the viewer. When I click on the export button (for instance export as xlsx), the data is correctly filtered and exported.

ghpu avatar Aug 12 '24 12:08 ghpu

When running rill with verbose and debug flags, I can see the error arises from the backend :

2024-08-12T16:00:19.994 INFO    grpc started call       {"protocol": "grpc", "peer.address": "127.0.0.1", "grpc.component": "server", "grpc.method_type": "unary", "grpc.method": "/rill.runtime.v1.QueryService/MetricsViewAggregation"}
2024-08-12T16:00:19.998 INFO    grpc finished call      {"protocol": "grpc", "peer.address": "127.0.0.1", "grpc.component": "server", "grpc.method_type": "unary", "grpc.method": "/rill.runtime.v1.QueryService/MetricsViewAggregation", "args.instance_id": "default", "args.metric_view": "dataframe_model_dashboard", "args.dimensions.names": [], "args.measures.names": [], "args.sort.names": [], "args.time_start": "", "args.time_end": "", "args.filter_count": 1, "args.limit": 100, "args.offset": 0, "args.priority": 0, "instance_id": "default", "query.cache_hit": false, "grpc.code": "Unknown", "duration": "4.308379ms", "error": "Conversion Error: Type VARCHAR with value 'fr' can't be cast to the destination type LIST"}

ghpu avatar Aug 12 '24 14:08 ghpu

Might be a problem with Duckdb, I traced the error up to : rows, err := conn.QueryxContext(ctx, stmt.Query, stmt.Args...)

in runtime/drivers/duckdb/olap.go

ghpu avatar Aug 20 '24 13:08 ghpu