linkedin / linkedin/coral

org.apache.calcite.runtime.CalciteException: Failed to encode '中文' in character set 'ISO-8859-1'

Open
#152 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
906
Forks
219
Avg merge
2d 13h
Merged PRs (30d)
2

Description

public void testTable() {
String sql = "select b, '中文' from test.t2 where b = a";
RelNode relNode = TestUtils.convertTable(sql);
RelToTrinoConverter relToTrinoConverter = new RelToTrinoConverter();
SqlNode expandedSql = relToTrinoConverter.convertToSqlNode(relNode);
System.out.println(expandedSql);
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the testTable reproduction, especially TestUtils.convertTable(sql) and RelToTrinoConverter.convertToSqlNode(relNode). Run the example containing the Chinese literal and trace where ISO-8859-1 encoding is applied. Done means the conversion completes without the CalciteException and preserves the literal in the resulting SQL node.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.