Liu Shaohui created KYLIN-3495:
----------------------------------

             Summary: Wrong datatypo when using on max function on a empty 
column
                 Key: KYLIN-3495
                 URL: https://issues.apache.org/jira/browse/KYLIN-3495
             Project: Kylin
          Issue Type: Bug
            Reporter: Liu Shaohui


SQL:
{code:java}
select 
count(*),sum(PER_BYTES_TIME_COST)/count(PER_BYTES_TIME_COST),max(PER_BYTES_TIME_COST),min(PER_BYTES_TIME_COST)
 from KYLIN_ONEBOX.HIVE_METRICS_JOB_DEV where KDAY_DATE >= '2018-07-01' and 
KDAY_DATE <= '2018-07-31' and PROJECT ='LEARN_KYLIN'{code}
 

Exception:
{code:java}
NoSuchMethodException: SqlFunctions.greater(java.math.BigDecimal, double)

while resolving method 'greater[class java.math.BigDecimal, double]' in class 
class org.apache.calcite.runtime.SqlFunctions
        at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
        at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
        at 
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156)
        at 
org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:218)
        at 
org.apache.kylin.rest.service.QueryService.execute(QueryService.java:940)
        at 
org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:670)
        at 
org.apache.kylin.rest.service.QueryService.query(QueryService.java:188)
        at 
org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:505)
        at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:464)
        at 
org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:390)
        at 
org.apache.kylin.rest.controller.QueryController.query(QueryController.java:86)
        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:483)
        at 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
        at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
        at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
        at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
        at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
        at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
        at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967)
        at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
        at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
        at 
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
        at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at 
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to