Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6146

Target charset should be used when comparing two strings through CONVERT/TRANSLATE function during validation

    XMLWordPrintableJSON

Details

    Description

      The following test in JdbcTest throws "Cannot apply = to the two different charsets ISO-8859-1 and GBK"

      CalciteAssert.hr()
              .query("select \"name\", \"empid\" from \"hr\".\"emps\"\n"
                  + "where convert('a' using GBK)=_GBK'a' order by \"empid\"")
              .returns("name=Eric; empid=200\n"
                  + "name=Sebastian; empid=150\n"
                  + "name=Theodore; empid=110\n"
                  + "name=Bill; empid=100\n");
      

      Since we try to convert 'a' with GBK, the charset of its result should also be treated as GBK.

      Attachments

        Issue Links

          Activity

            People

              VAE ZheHu
              VAE ZheHu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: