Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KYLIN-4491 Support presto pushdown #1209

Merged
merged 4 commits into from
Jun 4, 2020
Merged

Conversation

fanfanAlice
Copy link
Contributor

@fanfanAlice fanfanAlice commented May 14, 2020

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce to Kylin?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have create an issue on Kylin's jira, and have described the bug/feature there in detail
  • Commit messages in my PR start with the related jira ID, like "KYLIN-0000 Make Kylin project open-source"
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If this change need a document change, I will prepare another pr against the document branch
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...

@hit-lacus
Copy link
Member

hit-lacus commented May 14, 2020

Test Prepare

Put driver jar to $KYLIN_HOME/ext and restart Kylin instance.

@hit-lacus
Copy link
Member

hit-lacus commented May 14, 2020

Configuration

Modify project level configuration.
image

@hit-lacus
Copy link
Member

hit-lacus commented May 14, 2020

Test Pushdown

  • Kylin Query

image

  • Presto query history

image

  • kylin.log
2020-05-14 05:19:37,244 INFO  [http-bio-7225-exec-2] service.QueryService:377 : Check query permission in 0 ms.
2020-05-14 05:19:37,245 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] service.QueryService:418 : Using project: learn_kylin
2020-05-14 05:19:37,245 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] service.QueryService:419 : The original query:  -- select count(*) as cnt from KYLIN_ACCOUNT

SELECT DAYOFWEEK(KYLIN_CAL_DT.CAL_DT) as dow, count(*) as cnt
FROM KYLIN_CAL_DT
WHERE KYLIN_CAL_DT.DAY_OF_CAL_ID  >=2
GROUP BY DAYOFWEEK(KYLIN_CAL_DT.CAL_DT)
ORDER BY cnt desc
2020-05-14 05:19:37,254 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] service.QueryService:652 : The corrected query: select * from (SELECT DAYOFWEEK(KYLIN_CAL_DT.CAL_DT) as dow, count(*) as cnt
FROM KYLIN_CAL_DT
WHERE KYLIN_CAL_DT.DAY_OF_CAL_ID  >=2
GROUP BY DAYOFWEEK(KYLIN_CAL_DT.CAL_DT)
ORDER BY cnt desc) limit 50000
2020-05-14 05:19:37,558 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] util.PushDownExecutor:71 : Query failed to utilize pre-calculation, routing to other engines
java.sql.SQLException: Error while executing SQL "select * from (SELECT DAYOFWEEK(KYLIN_CAL_DT.CAL_DT) as dow, count(*) as cnt
FROM KYLIN_CAL_DT
WHERE KYLIN_CAL_DT.DAY_OF_CAL_ID  >=2
GROUP BY DAYOFWEEK(KYLIN_CAL_DT.CAL_DT)
ORDER BY cnt desc) limit 50000": No model found for OLAPContext, CUBE_NOT_READY, rel#312:OLAPTableScan.OLAP.[](table=[DEFAULT, KYLIN_CAL_DT],ctx=,fields=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])
	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:163)
	at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:227)
	at org.apache.kylin.rest.service.QueryService.executeRequest(QueryService.java:978)
	at org.apache.kylin.rest.service.QueryService.queryWithSqlMassage(QueryService.java:674)
	at org.apache.kylin.rest.service.QueryService.query(QueryService.java:219)
	at org.apache.kylin.rest.service.QueryService.queryAndUpdateCache(QueryService.java:484)
	at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:444)
	at org.apache.kylin.rest.service.QueryService.doQueryWithCache(QueryService.java:378)
	at org.apache.kylin.rest.controller.QueryController.query(QueryController.java:93)
	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.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:647)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	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)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:209)
	at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:244)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:492)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:165)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:1025)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:452)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1195)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:654)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:317)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.kylin.metadata.realization.NoRealizationFoundException: No model found for OLAPContext, CUBE_NOT_READY, rel#312:OLAPTableScan.OLAP.[](table=[DEFAULT, KYLIN_CAL_DT],ctx=,fields=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99])
	at org.apache.kylin.query.routing.RealizationChooser.attemptSelectRealization(RealizationChooser.java:68)
	at org.apache.kylin.query.routing.RealizationChooser.selectRealization(RealizationChooser.java:59)
	at org.apache.kylin.query.relnode.OLAPToEnumerableConverter.implement(OLAPToEnumerableConverter.java:96)
	at org.apache.calcite.adapter.enumerable.EnumerableRelImplementor.implementRoot(EnumerableRelImplementor.java:103)
	at org.apache.calcite.adapter.enumerable.EnumerableInterpretable.toBindable(EnumerableInterpretable.java:92)
	at org.apache.calcite.prepare.CalcitePrepareImpl$CalcitePreparingStmt.implement(CalcitePrepareImpl.java:1278)
	at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:331)
	at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:230)
	at org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:796)
	at org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:655)
	at org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:618)
	at org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:221)
	at org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:603)
	at org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:675)
	at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:156)
	... 84 more
2020-05-14 05:19:37,561 DEBUG [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] util.PushDownExecutor:123 : Query Pushdown runner org.apache.kylin.query.pushdown.PushDownRunnerOtherImpl@29c63154
2020-05-14 05:19:37,566 DEBUG [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] pushdown.PushDownRunnerOtherImpl:96 : the query is converted to SELECT *
FROM (SELECT CASE WHEN DAY_OF_WEEK("KYLIN_CAL_DT"."CAL_DT") IN (1, 2, 3, 4, 5, 6) THEN DAY_OF_WEEK("KYLIN_CAL_DT"."CAL_DT") + 1 ELSE 1 END AS "DOW", COUNT(*) AS "CNT"
            FROM "KYLIN_CAL_DT"
            WHERE "KYLIN_CAL_DT"."DAY_OF_CAL_ID" >= 2
            GROUP BY CASE WHEN DAY_OF_WEEK("KYLIN_CAL_DT"."CAL_DT") IN (1, 2, 3, 4, 5, 6) THEN DAY_OF_WEEK("KYLIN_CAL_DT"."CAL_DT") + 1 ELSE 1 END
            ORDER BY "CNT" DESC)
LIMIT 50000 after applying SDK converter.
2020-05-14 05:19:38,162 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] adaptor.AbstractJdbcAdaptor:65 : table schema info :-5
2020-05-14 05:19:38,162 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] adaptor.AbstractJdbcAdaptor:65 : table schema info :-5
2020-05-14 05:19:38,163 WARN  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] common.QueryContext:234 : Cannot find CubeSegmentStatisticsResult for context 0
2020-05-14 05:19:38,163 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] service.QueryService:1162 : Processed rows for each storageContext:
2020-05-14 05:19:38,163 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] service.BadQueryDetector:204 : Pushdown query has been running 0.917 seconds (project:learn_kylin, thread: 0x3b, user:ADMIN, query id:de5c3280-7ea0-b20c-2eff-ccb7dfe78bca) -- SELECT DAYOFWEEK(KYLIN_CAL_DT.CAL_DT) as dow, count(*) as cnt
FROM KYLIN_CAL_DT
WHERE KYLIN_CAL_DT.DAY_OF_CAL_ID  >=2
GROUP BY DAYOFWEEK(KYLIN_CAL_DT.CAL_DT)
ORDER BY cnt desc
2020-05-14 05:19:38,168 DEBUG [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] badquery.BadQueryHistoryManager:65 : Loaded 3 Bad Query(s)
2020-05-14 05:19:38,171 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] service.QueryService:496 : Stats of SQL response: isException: false, duration: 927, total scan count 0
2020-05-14 05:19:38,172 DEBUG [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] util.CheckUtil:40 : query does not hit cube nor hybrid
2020-05-14 05:19:38,172 INFO  [Query de5c3280-7ea0-b20c-2eff-ccb7dfe78bca-59] service.QueryService:364 :
==========================[QUERY]===============================
Query Id: de5c3280-7ea0-b20c-2eff-ccb7dfe78bca
SQL: SELECT DAYOFWEEK(KYLIN_CAL_DT.CAL_DT) as dow, count(*) as cnt
FROM KYLIN_CAL_DT
WHERE KYLIN_CAL_DT.DAY_OF_CAL_ID  >=2
GROUP BY DAYOFWEEK(KYLIN_CAL_DT.CAL_DT)
ORDER BY cnt desc
User: ADMIN
Success: true
Duration: 0.928
Project: learn_kylin
Realization Names: []
Cuboid Ids: []
Total scan count: 0
Total scan bytes: 0
Result row count: 7
Accept Partial: true
Is Partial Result: false
Hit Exception Cache: false
Storage cache used: false
Is Query Push-Down: true
Is Prepare: false
Trace URL: null
Message: null
==========================[QUERY]===============================

@fanfanAlice
Copy link
Contributor Author

Presto PushDown

No matter what data source you use, you can specify the corresponding data source to push down the query

kylin.query.pushdown.runner-class-name=org.apache.kylin.query.pushdown.PushDownRunnerOtherImpl
kylin.source.jdbc.dialect=presto
kylin.source.jdbc.adaptor=org.apache.kylin.sdk.datasource.adaptor.PrestoAdaptor
kylin.query.pushdown.jdbc.url=jdbc:presto://10.1.1.70:8083/hive/default
kylin.query.pushdown.jdbc.driver=com.facebook.presto.jdbc.PrestoDriver
kylin.query.pushdown.jdbc.username=presto
kylin.query.pushdown.jdbc.password=

kylin.query.pushdown.runner-class-name=org.apache.kylin.query.pushdown.PushDownRunnerOtherImpl : whether to enable query pushdown

kylin.source.jdbc.dialect=presto : specifies JDBC dialect. The default value is default

kylin.source.jdbc.adaptor=org.apache.kylin.sdk.datasource.adaptor.PrestoAdaptor : specifies JDBC adaptor

@hit-lacus hit-lacus marked this pull request as ready for review May 14, 2020 09:34
@hit-lacus
Copy link
Member

LGTM

@codecov-io
Copy link

Codecov Report

Merging #1209 into master will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1209      +/-   ##
============================================
- Coverage     24.87%   24.83%   -0.04%     
- Complexity     6264     6266       +2     
============================================
  Files          1453     1455       +2     
  Lines         89120    89278     +158     
  Branches      12438    12454      +16     
============================================
+ Hits          22172    22176       +4     
- Misses        64771    64927     +156     
+ Partials       2177     2175       -2     
Impacted Files Coverage Δ Complexity Δ
...he/kylin/sdk/datasource/adaptor/PrestoAdaptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...k/datasource/framework/SourceConnectorFactory.java 30.55% <0.00%> (-24.45%) 1.00 <0.00> (ø)
.../kylin/query/pushdown/PushDownRunnerOtherImpl.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
.../org/apache/kylin/query/util/PushDownExecutor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...java/org/apache/kylin/query/util/PushDownUtil.java 80.48% <0.00%> (ø) 4.00 <0.00> (ø)
...va/org/apache/kylin/rest/service/QueryService.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../apache/kylin/cube/cuboid/TreeCuboidScheduler.java 63.84% <0.00%> (-2.31%) 0.00% <0.00%> (ø%)
...tasource/framework/utils/ExpressionComparator.java 57.74% <0.00%> (+1.40%) 2.00% <0.00%> (ø%)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a174194...9e95247. Read the comment docs.

Copy link
Member

@hit-lacus hit-lacus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fanfanAlice , could you please share us with your opinion? Thank you.

import java.util.LinkedList;
import java.util.List;

public class PushDownRunnerOtherImpl extends AbstractPushdownRunner {
Copy link
Member

@hit-lacus hit-lacus May 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of PushDownRunnerOtherImpl is not well defined. Since it is the the advanced version of elder PushDownRunnerJdbcImpl, and reuse some logic in Data Source SDK. Maybe we change is name to something like PushDownRunnerJdbcAdvancedImpl? What do you think @shaofengshi ?

@codecov-commenter
Copy link

Codecov Report

Merging #1209 into master will increase coverage by 0.86%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1209      +/-   ##
============================================
+ Coverage     24.87%   25.74%   +0.86%     
- Complexity     6264     6624     +360     
============================================
  Files          1453     1483      +30     
  Lines         89120    91053    +1933     
  Branches      12438    12701     +263     
============================================
+ Hits          22172    23441    +1269     
- Misses        64771    65317     +546     
- Partials       2177     2295     +118     
Impacted Files Coverage Δ Complexity Δ
...he/kylin/sdk/datasource/adaptor/PrestoAdaptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...k/datasource/framework/SourceConnectorFactory.java 33.33% <0.00%> (-21.67%) 1.00 <1.00> (ø)
.../org/apache/kylin/query/util/PushDownExecutor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...java/org/apache/kylin/query/util/PushDownUtil.java 80.48% <0.00%> (ø) 4.00 <0.00> (ø)
...va/org/apache/kylin/rest/service/QueryService.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...e/kylin/storage/gtrecord/CubeScanRangePlanner.java 43.86% <0.00%> (-7.24%) 26.00% <0.00%> (ø%)
.../cachemanager/RemoteLocalFailOverCacheManager.java 78.57% <0.00%> (-6.05%) 7.00% <0.00%> (ø%)
.../apache/kylin/cube/cuboid/TreeCuboidScheduler.java 63.84% <0.00%> (-2.31%) 0.00% <0.00%> (ø%)
...g/apache/kylin/gridtable/GTScanRequestBuilder.java 56.16% <0.00%> (-1.81%) 13.00% <0.00%> (ø%)
.../apache/kylin/measure/bitmap/BitmapSerializer.java 27.77% <0.00%> (-1.64%) 5.00% <0.00%> (ø%)
... and 156 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a174194...325b6c1. Read the comment docs.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5962

  • 4 of 113 (3.54%) changed or added relevant lines in 5 files are covered.
  • 4366 unchanged lines in 84 files lost coverage.
  • Overall coverage increased (+0.9%) to 28.268%

Changes Missing Coverage Covered Lines Changed/Added Lines %
datasource-sdk/src/main/java/org/apache/kylin/sdk/datasource/framework/SourceConnectorFactory.java 4 5 80.0%
query/src/main/java/org/apache/kylin/query/util/PushDownUtil.java 0 2 0.0%
server-base/src/main/java/org/apache/kylin/rest/service/QueryService.java 0 2 0.0%
query/src/main/java/org/apache/kylin/query/util/PushDownExecutor.java 0 4 0.0%
datasource-sdk/src/main/java/org/apache/kylin/sdk/datasource/adaptor/PrestoAdaptor.java 0 100 0.0%
Files with Coverage Reduction New Missed Lines %
cache/src/main/java/org/apache/kylin/cache/cachemanager/RemoteLocalFailOverCacheManager.java 1 85.71%
engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/CalculateStatsFromBaseCuboidMapper.java 1 95.35%
query/src/main/java/org/apache/kylin/query/util/PushDownExecutor.java 1 0%
query/src/main/java/org/apache/kylin/query/util/PushDownUtil.java 1 85.37%
core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java 2 68.46%
core-metadata/src/main/java/org/apache/kylin/metadata/expression/ExpressionCountDistributor.java 2 94.44%
core-cube/src/main/java/org/apache/kylin/cube/CubeDescManager.java 3 38.57%
source-hive/src/main/java/org/apache/kylin/source/hive/HiveTableMeta.java 3 0%
core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java 5 77.81%
core-metadata/src/main/java/org/apache/kylin/measure/bitmap/BitmapMeasureType.java 5 18.52%
Totals Coverage Status
Change from base Build 5905: 0.9%
Covered Lines: 25739
Relevant Lines: 91053

💛 - Coveralls

Copy link
Contributor

@shaofengshi shaofengshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 LGTM

@shaofengshi shaofengshi merged commit cef1093 into apache:master Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants