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

Support building RexLiterals from Character values

    XMLWordPrintableJSON

Details

    Description

      Currently Literal should support all basic type, but not contains Character type.

      @Test void testCharacterLiteral() {
        char c = 'c';
        relBuilder.literal(c);
      } 

      would error out:

        cannot convert c (class java.lang.Character) to a constant
      java.lang.IllegalArgumentException: cannot convert c (class java.lang.Character) to a constant
          at org.apache.calcite.tools.RelBuilder.literal(RelBuilder.java:498)
          at org.apache.calcite.plan.RelOptUtilTest.testCharacterLiteral(RelOptUtilTest.java:410)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
          at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
          at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
          at org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:45)
          at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
          at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147) 

      we should support Character type in Literal.

      Attachments

        Issue Links

          Activity

            People

              xuzifu666 Yu Xu
              xuzifu666 Yu Xu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: