Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.39.0
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
- links to