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

Fixing locale error message in ExtractValue Function

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.21.0
    • Fix Version/s: 1.22.0
    • Component/s: core
    • Environment:

      OS: Windows7

      JDK: 1.8.0_121

      Locale: zh_CN

      Description

      When I fetch the recent master branch and build it, the tests added in CALCITE-3552 fail.

      For example: SqlXmlFunctionsTest#testExtractValue

      org.apache.calcite.test.SqlXmlFunctionsTest > testExtractValue() FAILED
          java.lang.AssertionError: extractValue(<a>ccc<b>ddd</b></a>, #)
          Expected: is org.apache.calcite.runtime.CalciteException: Illegal behavior 'javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: A location path was expected, but the following token was encountered:  #' EXTRACTVALUE: document: '<a>ccc<b>ddd</b></a>', xpath expression: '#'
               but: was <org.apache.calcite.runtime.CalciteException: Illegal behavior 'javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: 需要位置路径, 但遇到以下标记: #' EXTRACTVALUE: document: '<a>ccc<b>ddd</b></a>', xpath expression: '#'>
              at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
              at org.apache.calcite.test.SqlXmlFunctionsTest.assertFailed(SqlXmlFunctionsTest.java:70)
              at org.apache.calcite.test.SqlXmlFunctionsTest.assertExtractValueFailed(SqlXmlFunctionsTest.java:61)
              at org.apache.calcite.test.SqlXmlFunctionsTest.testExtractValue(SqlXmlFunctionsTest.java:47)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                danny0405 Danny Chen
                Reporter:
                donnyzone Feng Zhu
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m