codeant-ai-for-open-source[bot] commented on code in PR #41533:
URL: https://github.com/apache/superset/pull/41533#discussion_r3493937683
##########
tests/unit_tests/result_set_test.py:
##########
@@ -522,6 +522,37 @@ def
test_clickhouse_json_column_in_pa_table_is_valid_json() -> None:
assert parsed1 == {"e": 5}
+def test_stringify_values_preserves_non_ascii_characters() -> None:
+ """
+ Non-ASCII text inside array/struct/JSON column values (e.g. the Cyrillic
and
+ CJK strings produced by ``array_agg``) must render verbatim in the result
+ grid, not as ``\\uXXXX`` escape sequences. Regression test for #19388 and
+ #22904, where such values were displayed as "unicode gibberish".
+ """
+ data = np.array(
+ [
+ ["Лонгсливы", "Свитшоты"],
+ {"city": "北京", "country": "中国"},
+ "你好,世界!",
+ ],
+ dtype=object,
+ )
+ result = stringify_values(data)
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not require explicit type annotations for local variables in test
files; leaving test-local variables inferred is acceptable in this codebase.
**Applied to:**
- `**/test/**`
- `**/tests/**`
- `**/*test*.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
##########
tests/unit_tests/result_set_test.py:
##########
@@ -522,6 +522,37 @@ def
test_clickhouse_json_column_in_pa_table_is_valid_json() -> None:
assert parsed1 == {"e": 5}
+def test_stringify_values_preserves_non_ascii_characters() -> None:
+ """
+ Non-ASCII text inside array/struct/JSON column values (e.g. the Cyrillic
and
+ CJK strings produced by ``array_agg``) must render verbatim in the result
+ grid, not as ``\\uXXXX`` escape sequences. Regression test for #19388 and
+ #22904, where such values were displayed as "unicode gibberish".
+ """
+ data = np.array(
+ [
+ ["Лонгсливы", "Свитшоты"],
+ {"city": "北京", "country": "中国"},
+ "你好,世界!",
+ ],
+ dtype=object,
+ )
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not require explicit type annotations for local variables in test
files; only enforce type hints on function signatures there.
**Applied to:**
- `**/test/**`
- `**/tests/**`
- `**/*test*.<ext>`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]