lehug opened a new issue #15316:
URL: https://github.com/apache/superset/issues/15316


   add filter with Chinese, then cause Issue 1002,but SQL exactly works well .
   the filter is `code_project = '中文'`
   
   ### Actual results
   change to `line chart` then `Error: 'charmap' codec can't encode characters 
in position 233-235: character maps to <undefined>
   
   `
   response 
   `{"cache_key": "45f4a4f7a632467ddf2b39a3f518891b", "cached_dttm": null, 
"cache_timeout": 300, "errors": [{"message": "SELECT DATE(page_visit_at) AS 
__timestamp,\n       session_id AS session_id,\n       COUNT(*) AS count\nFROM 
`ray-tool-test`.user_behavior_record\nINNER JOIN\n  (SELECT session_id AS 
session_id__,\n          COUNT(*) AS mme_inner__\n   FROM 
`ray-tool-test`.user_behavior_record\n   WHERE code_project = 
'\u7231\u5bb6\u6821'\n     AND page_visit_at >= '2021-06-08 00:00:00.000000'\n  
   AND page_visit_at < '2021-06-23 00:00:00.000000'\n   GROUP BY session_id\n   
ORDER BY mme_inner__ DESC\n   LIMIT 100) AS anon_1 ON session_id = 
session_id__\nWHERE page_visit_at >= '2021-06-08 00:00:00.000000'\n  AND 
page_visit_at < '2021-06-23 00:00:00.000000'\n  AND code_project = 
'\u7231\u5bb6\u6821'\nGROUP BY session_id,\n         DATE(page_visit_at)\nLIMIT 
10000", "error_type": "GENERIC_DB_ENGINE_ERROR", "level": "error", "extra": 
{"engine_name": "MySQL", "issue_codes": [{"code": 1
 002, "message": "Issue 1002 - The database returned an unexpected 
error."}]}}], "form_data": {"viz_type": "line", "datasource": "2__table", 
"slice_id": 3, "url_params": {}, "time_range_endpoints": ["inclusive", 
"exclusive"], "granularity_sqla": "page_visit_at", "time_grain_sqla": "P1D", 
"time_range": "DATEADD(DATETIME(\"2021-06-23T00:00:00\"), -15, day) : 
2021-06-23T00:00:00", "metrics": ["count"], "adhoc_filters": 
[{"expressionType": "SIMPLE", "subject": "code_project", "operator": "==", 
"operatorId": "EQUALS", "comparator": "\u7231\u5bb6\u6821", "clause": "WHERE", 
"sqlExpression": null, "isExtra": false, "isNew": false, "filterOptionName": 
"filter_01thl2lpi5j1_fogewr6s898"}], "groupby": ["session_id"], "limit": 100, 
"order_desc": true, "row_limit": 10000, "color_scheme": "supersetColors", 
"label_colors": {}, "show_brush": "auto", "rich_tooltip": true, 
"line_interpolation": "linear", "bottom_margin": "auto", "x_ticks_layout": 
"auto", "x_axis_format": "smart_date", "left_margin": "a
 uto", "y_axis_format": "SMART_NUMBER", "y_axis_bounds": [null, null], 
"rolling_type": "None", "comparison_type": "values", "annotation_layers": [], 
"applied_time_extras": {}, "where": "", "having": "", "having_filters": [], 
"filters": [{"col": "code_project", "op": "==", "val": "\u7231\u5bb6\u6821"}]}, 
"is_cached": false, "query": "SELECT DATE(page_visit_at) AS __timestamp,\n      
 session_id AS session_id,\n       COUNT(*) AS count\nFROM 
`ray-tool-test`.user_behavior_record\nINNER JOIN\n  (SELECT session_id AS 
session_id__,\n          COUNT(*) AS mme_inner__\n   FROM 
`ray-tool-test`.user_behavior_record\n   WHERE code_project = 
'\u7231\u5bb6\u6821'\n     AND page_visit_at >= '2021-06-08 00:00:00.000000'\n  
   AND page_visit_at < '2021-06-23 00:00:00.000000'\n   GROUP BY session_id\n   
ORDER BY mme_inner__ DESC\n   LIMIT 100) AS anon_1 ON session_id = 
session_id__\nWHERE page_visit_at >= '2021-06-08 00:00:00.000000'\n  AND 
page_visit_at < '2021-06-23 00:00:00.000000'\n  AND code_pro
 ject = '\u7231\u5bb6\u6821'\nGROUP BY session_id,\n         
DATE(page_visit_at)\nLIMIT 10000", "from_dttm": 1623110400000.0, "to_dttm": 
1624406400000.0, "status": "failed", "stacktrace": null, "rowcount": 0, 
"applied_filters": [{"column": "code_project"}], "rejected_filters": []}`
   change to `filter box' then `Unexpected error
   Error: 'charmap' codec can't encode characters in position 199-201: 
character maps to <undefined>`
   
   ### Environment
   
   (please complete the following information):
   - helm 0.1.5
   - superset version: 
`3f158fd32e50ba08a09689422709d2d8911c69fd692b96f06e12377b08c39a0b` latest
   - python version: `python --version`
   - node.js version: `node -v`
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to