[
https://issues.apache.org/jira/browse/CALCITE-7013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mihai Budiu resolved CALCITE-7013.
----------------------------------
Resolution: Fixed
Fixed in
[https://github.com/apache/calcite/commit/e9f7dfc318b15198df617a9cdb0f477d30997517]
Thank you for the fix [~xuzifu666]
> Support building RexLiterals from Character values
> --------------------------------------------------
>
> Key: CALCITE-7013
> URL: https://issues.apache.org/jira/browse/CALCITE-7013
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.39.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.40.0
>
>
> Currently Literal should support all basic type, but not contains Character
> type.
> {code:java}
> @Test void testCharacterLiteral() {
> char c = 'c';
> relBuilder.literal(c);
> } {code}
> would error out:
> {code:java}
> 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)
> {code}
> we should support Character type in Literal.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)