[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (CALCITE-2616) Can't create Unicode literal by RelBuilder

Anton Haidai created CALCITE-2616:

             Summary: Can't create Unicode literal by RelBuilder
                 Key: CALCITE-2616
                 URL: https://issues.apache.org/jira/browse/CALCITE-2616
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.17.0
            Reporter: Anton Haidai
            Assignee: Julian Hyde

Test in RelBuilderTest to reproduce the issue:
@Test public void testScanWithFilterByUnicodeValue() {
  final RelBuilder builder = RelBuilder.create(config().build());
  RelNode root =
                  builder.literal("Петро ピーター")

org.apache.calcite.runtime.CalciteException: Failed to encode 'Петро ピーター' in character set 'ISO-8859-1'

Possible workaround: create saffron.properties with the following property


But UTF-8 will not work as a value of this property, see SqlUtil.translateCharacterSetName

Related code:
 * SqlUtil.translateCharacterSetName(charsetName)
 * RelDataTypeFactoryImpl.getDefaultCharset()
 * SaffronProperties



This message was sent by Atlassian JIRA