You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Yu Xu (Jira)" <ji...@apache.org> on 2025/05/13 15:25:00 UTC
[jira] [Created] (CALCITE-7013) Literal should support Character basic type
Yu Xu created CALCITE-7013:
------------------------------
Summary: Literal should support Character basic type
Key: CALCITE-7013
URL: https://issues.apache.org/jira/browse/CALCITE-7013
Project: Calcite
Issue Type: New Feature
Components: core
Affects Versions: 1.39.0
Reporter: Yu Xu
Assignee: Yu Xu
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)