[jira] [Created] (KYLIN-3989) Invalid temporary table path for kylin_metadata

2019-04-26 Thread Frederic Souchu (JIRA)
Frederic Souchu created KYLIN-3989:
--

 Summary: Invalid temporary table path for kylin_metadata
 Key: KYLIN-3989
 URL: https://issues.apache.org/jira/browse/KYLIN-3989
 Project: Kylin
  Issue Type: Bug
Affects Versions: v2.5.2
 Environment: MapR 6.1
Hive 2.3
Reporter: Frederic Souchu


How to reproduce:
 * create a mode
 * define a cube
 * build the cube

The cube building will fail with the following Hive logs:
{code:java}
USE default;
No rows affected (0.067 seconds)
0: jdbc:hive2://x.com>
0: jdbc:hive2://x.com> DROP TABLE IF EXISTS 
kylin_intermediate_txn_cube_99023bdd_79e8_1186_2480_28b1d352d09e;
No rows affected (0.023 seconds)
0: jdbc:hive2://x.com> CREATE EXTERNAL TABLE IF NOT EXISTS 
kylin_intermediate_txn_cube_99023bdd_79e8_1186_2480_28b1d352d09
e
. . . . . . . . . . . . . . . . . . . . . . .> (
. . . . . . . . . . . . . . . . . . . . . . .> PAYMENTS_GLOBALMERCHANTUID int
. . . . . . . . . . . . . . . . . . . . . . .> )
. . . . . . . . . . . . . . . . . . . . . . .> STORED AS SEQUENCEFILE
. . . . . . . . . . . . . . . . . . . . . . .> LOCATION 
'maprfs:///apps/kylin_metadata/kylin-15b76d79-29ce-5782-d84e-bd33c305fc6f/kylin_intermedia
te_txn_cube_99023bdd_79e8_1186_2480_28b1d352d09e';
Error: org.apache.hive.service.cli.HiveSQLException: Error while processing 
statement: FAILED: Execution Error, return code 1 from 
org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: 
java.io.IOException Error: Not a directory(20), file: 
kylin_intermediate_txn_cube_99023bdd_79e8_1186_2480_28b1d352d09e, user name: 
mapr, ID: 5000)
{code}

using metastore.sh to list content gives:
{code}
2019-04-26 15:25:54,231 INFO  [main] common.KylinConfig:100 : Loading 
kylin-defaults.properties from 
file:/opt/apache-kylin-2.5.2-bin-hbase1x/tool/kylin-tool-2.5.2.jar!/kylin-defaults.properties
2019-04-26 15:25:54,257 DEBUG [main] common.KylinConfig:327 : KYLIN_CONF 
property was not set, will seek KYLIN_HOME env variable
2019-04-26 15:25:54,263 INFO  [main] common.KylinConfig:135 : Initialized a new 
KylinConfig from getInstanceFromEnv : 453523494
2019-04-26 15:25:54,376 INFO  [main] persistence.ResourceStore:88 : Using 
metadata url /apps/kylin_metadata@hbase for resource store
2019-04-26 15:25:55,684 DEBUG [main] hbase.HBaseConnection:180 : Using the 
working dir FS for HBase: maprfs:///
2019-04-26 15:25:55,684 INFO  [main] hbase.HBaseConnection:257 : connection is 
null or closed, creating a new one
2019-04-26 15:25:55,719 INFO  [main] client.ConnectionFactory:272 : 
ConnectionFactory receives mapr.hbase.default.db(maprdb), set 
clusterType(MAPR_ONLY), user(mapr), hbase_admin_connect_at_construction(false)
2019-04-26 15:25:55,899 DEBUG [main] hbase.HBaseConnection:306 : HTable 
'/apps/kylin_metadata' already exists
null
2019-04-26 15:25:56,400 INFO  [close-hbase-conn] hbase.HBaseConnection:136 : 
Closing HBase connections...
{code}



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


[jira] [Commented] (KYLIN-3981) Auto Merge Job failed to execute on windows

2019-04-26 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826991#comment-16826991
 ] 

ASF subversion and git services commented on KYLIN-3981:


Commit c04694bf9a7e70e7f63870157884fdcde030f88a in kylin's branch 
refs/heads/master from GinaZhai
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=c04694b ]

KYLIN-3981 Auto Merge Job failed to execute on windows


> Auto Merge Job failed to execute on windows
> ---
>
> Key: KYLIN-3981
> URL: https://issues.apache.org/jira/browse/KYLIN-3981
> Project: Kylin
>  Issue Type: Bug
>Affects Versions: v2.6.1
>Reporter: Na Zhai
>Assignee: Na Zhai
>Priority: Major
> Fix For: v2.6.2
>
>
> Auto Merge Job failed to execute on windows. It will throw the following 
> errors.
> {code:none}
> java.lang.IllegalStateException: Metadata uri : 
> C:\Users\NAD096~1.ZHA\AppData\Local\Temp\kylin_job_meta1467762575939435363\meta
>  is not recognized
>  at org.apache.kylin.common.KylinConfig.decideUriType(KylinConfig.java:211)
>  at 
> org.apache.kylin.common.KylinConfig.createInstanceFromUri(KylinConfig.java:221)
>  at 
> org.apache.kylin.engine.mr.common.JobRelatedMetaUtil.dumpResources(JobRelatedMetaUtil.java:68)
>  at 
> org.apache.kylin.engine.mr.common.JobRelatedMetaUtil.dumpAndUploadKylinPropsAndMetadata(JobRelatedMetaUtil.java:87)
>  at 
> org.apache.kylin.engine.mr.common.AbstractHadoopJob.attachSegmentsMetadataWithDict(AbstractHadoopJob.java:572)
>  at 
> org.apache.kylin.engine.mr.steps.MergeDictionaryJob.run(MergeDictionaryJob.java:104)
>  at 
> org.apache.kylin.engine.mr.common.MapReduceExecutable.doWork(MapReduceExecutable.java:131)
>  at 
> org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:179)
>  at 
> org.apache.kylin.job.execution.DefaultChainedExecutable.doWork(DefaultChainedExecutable.java:71)
>  at 
> org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:179)
>  at 
> org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:114)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)
>  Suppressed: java.io.FileNotFoundException: File does not exist: 
> C:\Users\NAD096~1.ZHA\AppData\Local\Temp\kylin_job_meta1467762575939435363\meta
>  at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2275)
>  at 
> org.apache.kylin.common.persistence.AutoDeleteDirectory.close(AutoDeleteDirectory.java:56)
>  at 
> org.apache.kylin.engine.mr.common.JobRelatedMetaUtil.dumpAndUploadKylinPropsAndMetadata(JobRelatedMetaUtil.java:103)
>  ... 10 more
> Caused by: java.lang.IllegalStateException: Metadata uri : 
> C:\Users\NAD096~1.ZHA\AppData\Local\Temp\kylin_job_meta1467762575939435363\meta
>  is not a valid REST URI address
>  at org.apache.kylin.common.KylinConfig.decideUriType(KylinConfig.java:208)
>  ... 13 more 
> {code}



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


[jira] [Commented] (KYLIN-3981) Auto Merge Job failed to execute on windows

2019-04-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3981?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826992#comment-16826992
 ] 

ASF GitHub Bot commented on KYLIN-3981:
---

nichunen commented on pull request #620: KYLIN-3981 Auto Merge Job failed to 
execute on windows
URL: https://github.com/apache/kylin/pull/620
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Auto Merge Job failed to execute on windows
> ---
>
> Key: KYLIN-3981
> URL: https://issues.apache.org/jira/browse/KYLIN-3981
> Project: Kylin
>  Issue Type: Bug
>Affects Versions: v2.6.1
>Reporter: Na Zhai
>Assignee: Na Zhai
>Priority: Major
> Fix For: v2.6.2
>
>
> Auto Merge Job failed to execute on windows. It will throw the following 
> errors.
> {code:none}
> java.lang.IllegalStateException: Metadata uri : 
> C:\Users\NAD096~1.ZHA\AppData\Local\Temp\kylin_job_meta1467762575939435363\meta
>  is not recognized
>  at org.apache.kylin.common.KylinConfig.decideUriType(KylinConfig.java:211)
>  at 
> org.apache.kylin.common.KylinConfig.createInstanceFromUri(KylinConfig.java:221)
>  at 
> org.apache.kylin.engine.mr.common.JobRelatedMetaUtil.dumpResources(JobRelatedMetaUtil.java:68)
>  at 
> org.apache.kylin.engine.mr.common.JobRelatedMetaUtil.dumpAndUploadKylinPropsAndMetadata(JobRelatedMetaUtil.java:87)
>  at 
> org.apache.kylin.engine.mr.common.AbstractHadoopJob.attachSegmentsMetadataWithDict(AbstractHadoopJob.java:572)
>  at 
> org.apache.kylin.engine.mr.steps.MergeDictionaryJob.run(MergeDictionaryJob.java:104)
>  at 
> org.apache.kylin.engine.mr.common.MapReduceExecutable.doWork(MapReduceExecutable.java:131)
>  at 
> org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:179)
>  at 
> org.apache.kylin.job.execution.DefaultChainedExecutable.doWork(DefaultChainedExecutable.java:71)
>  at 
> org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:179)
>  at 
> org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:114)
>  at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)
>  Suppressed: java.io.FileNotFoundException: File does not exist: 
> C:\Users\NAD096~1.ZHA\AppData\Local\Temp\kylin_job_meta1467762575939435363\meta
>  at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2275)
>  at 
> org.apache.kylin.common.persistence.AutoDeleteDirectory.close(AutoDeleteDirectory.java:56)
>  at 
> org.apache.kylin.engine.mr.common.JobRelatedMetaUtil.dumpAndUploadKylinPropsAndMetadata(JobRelatedMetaUtil.java:103)
>  ... 10 more
> Caused by: java.lang.IllegalStateException: Metadata uri : 
> C:\Users\NAD096~1.ZHA\AppData\Local\Temp\kylin_job_meta1467762575939435363\meta
>  is not a valid REST URI address
>  at org.apache.kylin.common.KylinConfig.decideUriType(KylinConfig.java:208)
>  ... 13 more 
> {code}



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


[jira] [Commented] (KYLIN-3987) Give more reducer for UHC column in fact distinct job

2019-04-26 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826989#comment-16826989
 ] 

ASF subversion and git services commented on KYLIN-3987:


Commit 4b11e1d04e495ec6fd9484dd73c4d001644b431a in kylin's branch 
refs/heads/master from chao long
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=4b11e1d ]

KYLIN-3987 Set a larger value of reducer num for fact distinct job


> Give more reducer for UHC column in fact distinct job
> -
>
> Key: KYLIN-3987
> URL: https://issues.apache.org/jira/browse/KYLIN-3987
> Project: Kylin
>  Issue Type: Bug
>Reporter: Chao Long
>Assignee: Chao Long
>Priority: Major
> Fix For: v2.6.2
>
>
> The defualt value of the reducer number for UHC column in fact distinct job 
> is too small(default 1),  the fact distinct job may be very slow, even throw 
> OOM exception. We should give it a large value by default.



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


[GitHub] [kylin] nichunen merged pull request #620: KYLIN-3981 Auto Merge Job failed to execute on windows

2019-04-26 Thread GitBox
nichunen merged pull request #620: KYLIN-3981 Auto Merge Job failed to execute 
on windows
URL: https://github.com/apache/kylin/pull/620
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (KYLIN-3987) Give more reducer for UHC column in fact distinct job

2019-04-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826988#comment-16826988
 ] 

ASF GitHub Bot commented on KYLIN-3987:
---

nichunen commented on pull request #621: KYLIN-3987 Set a larger value of 
reducer num for fact distinct job
URL: https://github.com/apache/kylin/pull/621
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Give more reducer for UHC column in fact distinct job
> -
>
> Key: KYLIN-3987
> URL: https://issues.apache.org/jira/browse/KYLIN-3987
> Project: Kylin
>  Issue Type: Bug
>Reporter: Chao Long
>Assignee: Chao Long
>Priority: Major
> Fix For: v2.6.2
>
>
> The defualt value of the reducer number for UHC column in fact distinct job 
> is too small(default 1),  the fact distinct job may be very slow, even throw 
> OOM exception. We should give it a large value by default.



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


[GitHub] [kylin] nichunen merged pull request #621: KYLIN-3987 Set a larger value of reducer num for fact distinct job

2019-04-26 Thread GitBox
nichunen merged pull request #621: KYLIN-3987 Set a larger value of reducer num 
for fact distinct job
URL: https://github.com/apache/kylin/pull/621
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Created] (KYLIN-3988) Weighted Average does not work on cube

2019-04-26 Thread Anoop Krishnaswamy (JIRA)
Anoop Krishnaswamy created KYLIN-3988:
-

 Summary: Weighted Average does not work on cube
 Key: KYLIN-3988
 URL: https://issues.apache.org/jira/browse/KYLIN-3988
 Project: Kylin
  Issue Type: Bug
  Components: Driver - ODBC
Affects Versions: v2.6.1
Reporter: Anoop Krishnaswamy


When we try to get aggregate over multiplication of 2 metrics it throws an 
error:


That both of the two sides of the BinaryTupleExpression own columns is not 
supported for * while executing SQL: "select 
sum(riskscoreinitial*cyc_xxx_balanceAdb), cyc_xxx_cyclesdelinquent from 
fct_profit_table_monthly group by cyc_xxx_cyclesdelinquent LIMIT 5"

 

My query looks something like this :

 

select sum(*),  from  group by 

Any guidance will help



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


[GitHub] [kylin] coveralls commented on issue #621: KYLIN-3987 Set a larger value of reducer num for fact distinct job

2019-04-26 Thread GitBox
coveralls commented on issue #621: KYLIN-3987 Set a larger value of reducer num 
for fact distinct job
URL: https://github.com/apache/kylin/pull/621#issuecomment-487019097
 
 
   ## Pull Request Test Coverage Report for [Build 
4425](https://coveralls.io/builds/23042291)
   
   * **0** of **1**   **(0.0%)**  changed or added relevant line in **1** file 
are covered.
   * **4** unchanged lines in **1** file lost coverage.
   * Overall coverage increased (+**0.001%**) to **27.811%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-|--||---: |
   | 
[core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java](https://coveralls.io/builds/23042291/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2FKylinConfigBase.java#L1358)
 | 0 | 1 | 0.0%
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-|--|--: |
   | 
[core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://coveralls.io/builds/23042291/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Finmemcubing%2FMemDiskStore.java#L449)
 | 4 | 78.12% |
   
   
   |  Totals | [![Coverage 
Status](https://coveralls.io/builds/23042291/badge)](https://coveralls.io/builds/23042291)
 |
   | :-- | --: |
   | Change from base [Build 4423](https://coveralls.io/builds/23036401): |  
0.001% |
   | Covered Lines: | 22752 |
   | Relevant Lines: | 81808 |
   
   ---
   #   - [Coveralls](https://coveralls.io)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [kylin] codecov-io commented on issue #621: KYLIN-3987 Set a larger value of reducer num for fact distinct job

2019-04-26 Thread GitBox
codecov-io commented on issue #621: KYLIN-3987 Set a larger value of reducer 
num for fact distinct job
URL: https://github.com/apache/kylin/pull/621#issuecomment-487018792
 
 
   # [Codecov](https://codecov.io/gh/apache/kylin/pull/621?src=pr=h1) Report
   > Merging [#621](https://codecov.io/gh/apache/kylin/pull/621?src=pr=desc) 
into 
[master](https://codecov.io/gh/apache/kylin/commit/c42aafd0bd58935b5ac5836103f05e5208e84ef2?src=pr=desc)
 will **increase** coverage by `<.01%`.
   > The diff coverage is `0%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/kylin/pull/621/graphs/tree.svg?width=650=JawVgbgsVo=150=pr)](https://codecov.io/gh/apache/kylin/pull/621?src=pr=tree)
   
   ```diff
   @@ Coverage Diff  @@
   ## master #621  +/-   ##
   
   + Coverage 25.33%   25.33%   +<.01% 
 Complexity 5839 5839  
   
 Files  1379 1379  
 Lines 8180881808  
 Branches  1146511465  
   
   + Hits  2072220723   +1 
   + Misses5906159060   -1 
 Partials   2025 2025
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/kylin/pull/621?src=pr=tree) | Coverage Δ 
| Complexity Δ | |
   |---|---|---|---|
   | 
[.../java/org/apache/kylin/common/KylinConfigBase.java](https://codecov.io/gh/apache/kylin/pull/621/diff?src=pr=tree#diff-Y29yZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2NvbW1vbi9LeWxpbkNvbmZpZ0Jhc2UuamF2YQ==)
 | `13.08% <0%> (ø)` | `42 <0> (ø)` | :arrow_down: |
   | 
[...rg/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://codecov.io/gh/apache/kylin/pull/621/diff?src=pr=tree#diff-Y29yZS1jdWJlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reWxpbi9jdWJlL2lubWVtY3ViaW5nL01lbURpc2tTdG9yZS5qYXZh)
 | `69.6% <0%> (+0.3%)` | `7% <0%> (ø)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/kylin/pull/621?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/kylin/pull/621?src=pr=footer). Last 
update 
[c42aafd...017dbdf](https://codecov.io/gh/apache/kylin/pull/621?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Commented] (KYLIN-3987) Give more reducer for UHC column in fact distinct job

2019-04-26 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826861#comment-16826861
 ] 

ASF GitHub Bot commented on KYLIN-3987:
---

Wayne1c commented on pull request #621: KYLIN-3987 Set a larger value of 
reducer num for fact distinct job
URL: https://github.com/apache/kylin/pull/621
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Give more reducer for UHC column in fact distinct job
> -
>
> Key: KYLIN-3987
> URL: https://issues.apache.org/jira/browse/KYLIN-3987
> Project: Kylin
>  Issue Type: Bug
>Reporter: Chao Long
>Assignee: Chao Long
>Priority: Major
> Fix For: v2.6.2
>
>
> The defualt value of the reducer number for UHC column in fact distinct job 
> is too small(default 1),  the fact distinct job may be very slow, even throw 
> OOM exception. We should give it a large value by default.



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


[GitHub] [kylin] asfgit commented on issue #621: KYLIN-3987 Set a larger value of reducer num for fact distinct job

2019-04-26 Thread GitBox
asfgit commented on issue #621: KYLIN-3987 Set a larger value of reducer num 
for fact distinct job
URL: https://github.com/apache/kylin/pull/621#issuecomment-487010213
 
 
   Can one of the admins verify this patch?


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [kylin] Wayne1c opened a new pull request #621: KYLIN-3987 Set a larger value of reducer num for fact distinct job

2019-04-26 Thread GitBox
Wayne1c opened a new pull request #621: KYLIN-3987 Set a larger value of 
reducer num for fact distinct job
URL: https://github.com/apache/kylin/pull/621
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Updated] (KYLIN-3987) Give more reducer for UHC column in fact distinct job

2019-04-26 Thread Chao Long (JIRA)


 [ 
https://issues.apache.org/jira/browse/KYLIN-3987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chao Long updated KYLIN-3987:
-
Description: The defualt value of the reducer number for UHC column in fact 
distinct job is too small(default 1),  the fact distinct job may be very slow, 
even throw OOM exception. We should give it a large value by default.

> Give more reducer for UHC column in fact distinct job
> -
>
> Key: KYLIN-3987
> URL: https://issues.apache.org/jira/browse/KYLIN-3987
> Project: Kylin
>  Issue Type: Bug
>Reporter: Chao Long
>Assignee: Chao Long
>Priority: Major
> Fix For: v2.6.2
>
>
> The defualt value of the reducer number for UHC column in fact distinct job 
> is too small(default 1),  the fact distinct job may be very slow, even throw 
> OOM exception. We should give it a large value by default.



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


[jira] [Created] (KYLIN-3987) Give more reducer for UHC column in fact distinct job

2019-04-26 Thread Chao Long (JIRA)
Chao Long created KYLIN-3987:


 Summary: Give more reducer for UHC column in fact distinct job
 Key: KYLIN-3987
 URL: https://issues.apache.org/jira/browse/KYLIN-3987
 Project: Kylin
  Issue Type: Bug
Reporter: Chao Long
Assignee: Chao Long
 Fix For: v2.6.2






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


[jira] [Updated] (KYLIN-3986) Add hint about the absent measures after a successful query

2019-04-26 Thread Yuzhang QIU (JIRA)


 [ 
https://issues.apache.org/jira/browse/KYLIN-3986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuzhang QIU updated KYLIN-3986:
---
Summary: Add hint about the absent measures after a successful query  (was: 
Add hint about the absent measures after a success query)

> Add hint about the absent measures after a successful query
> ---
>
> Key: KYLIN-3986
> URL: https://issues.apache.org/jira/browse/KYLIN-3986
> Project: Kylin
>  Issue Type: Sub-task
>  Components: Query Engine
>Affects Versions: v2.5.2
>Reporter: Yuzhang QIU
>Assignee: Yuzhang QIU
>Priority: Minor
>




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


[jira] [Commented] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Shaofeng SHI (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826833#comment-16826833
 ] 

Shaofeng SHI commented on KYLIN-3967:
-

Interesting, I did a small change (move the "WHERE  trans_id > 10" to the inner 
sub query) to the "not working" query, it can return result:

 

 
{code:java}
SELECT Sum(CASE
  WHEN trans_id_alias IN( 11, 12, 13 ) THEN price_alias
ELSE 0
  END) AS price_case_sum,
 part_dt_alias
FROM (SELECT price_alias,
  trans_id_alias,
  part_dt_alias
  FROM (SELECT price AS price_alias,
trans_id AS trans_id_alias,
part_dt AS part_dt_alias
FROM kylin_sales 
  WHERE trans_id > 10) as yy
 ) as xx
GROUP BY part_dt_alias
order by price_case_sum desc
{code}
 

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Created] (KYLIN-3986) Add hint about the absent measures after a success query

2019-04-26 Thread Yuzhang QIU (JIRA)
Yuzhang QIU created KYLIN-3986:
--

 Summary: Add hint about the absent measures after a success query
 Key: KYLIN-3986
 URL: https://issues.apache.org/jira/browse/KYLIN-3986
 Project: Kylin
  Issue Type: Sub-task
  Components: Query Engine
Affects Versions: v2.5.2
Reporter: Yuzhang QIU
Assignee: Yuzhang QIU






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


[jira] [Created] (KYLIN-3985) [Web UI] Support map measures to muti-qualifier in column family

2019-04-26 Thread Yuzhang QIU (JIRA)
Yuzhang QIU created KYLIN-3985:
--

 Summary: [Web UI] Support map measures to muti-qualifier in column 
family
 Key: KYLIN-3985
 URL: https://issues.apache.org/jira/browse/KYLIN-3985
 Project: Kylin
  Issue Type: Sub-task
  Components: Web 
Affects Versions: v2.5.2
Reporter: Yuzhang QIU
Assignee: Yuzhang QIU






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


[jira] [Updated] (KYLIN-3984) Update measure metadata after job finished

2019-04-26 Thread Yuzhang QIU (JIRA)


 [ 
https://issues.apache.org/jira/browse/KYLIN-3984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yuzhang QIU updated KYLIN-3984:
---
Component/s: Job Engine

> Update measure metadata after job finished
> --
>
> Key: KYLIN-3984
> URL: https://issues.apache.org/jira/browse/KYLIN-3984
> Project: Kylin
>  Issue Type: Sub-task
>  Components: Job Engine
>Affects Versions: v2.5.2
>Reporter: Yuzhang QIU
>Assignee: Yuzhang QIU
>Priority: Minor
>
> Merge, build and refresh cube will update measure metadata



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


[jira] [Created] (KYLIN-3984) Update measure metadata after job finished

2019-04-26 Thread Yuzhang QIU (JIRA)
Yuzhang QIU created KYLIN-3984:
--

 Summary: Update measure metadata after job finished
 Key: KYLIN-3984
 URL: https://issues.apache.org/jira/browse/KYLIN-3984
 Project: Kylin
  Issue Type: Sub-task
Affects Versions: v2.5.2
Reporter: Yuzhang QIU
Assignee: Yuzhang QIU


Merge, build and refresh cube will update measure metadata



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


[jira] [Created] (KYLIN-3983) Add extra metadata for measure

2019-04-26 Thread Yuzhang QIU (JIRA)
Yuzhang QIU created KYLIN-3983:
--

 Summary: Add extra metadata for measure
 Key: KYLIN-3983
 URL: https://issues.apache.org/jira/browse/KYLIN-3983
 Project: Kylin
  Issue Type: Sub-task
  Components: Metadata
Affects Versions: v2.5.2
Reporter: Yuzhang QIU
Assignee: Yuzhang QIU


Just like CubeDesc and CubeInstance, we need to add extra metadata for measure 
to persist some runtime data.



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


[jira] [Comment Edited] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread hejian (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826803#comment-16826803
 ] 

hejian edited comment on KYLIN-3967 at 4/26/19 9:33 AM:


{code:java}
sum(case when derived_col='1' then measure_col else 0 end){code}
*derived_col*  is from lookup table and *measure_col* is a predefine measure.

I think this case should be supported, because case expression is base on 
further aggregations, and the way that derived column works as well?


was (Author: hejian999):
{code:java}
sum(case when derived_col='1' then measure_col else 0 end){code}
*derived_col*  is from lookup table and *measure_col* is ** a ** predefine ** 
measure.

I think this case should be supported, because case expression is base on 
further aggregations, and the way that derived column works as well?

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Commented] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Zhong Yanghong (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826809#comment-16826809
 ] 

Zhong Yanghong commented on KYLIN-3967:
---

Theoretically, this can be supported. If the filter of the derived column can 
be transformed to the filter of the related foreign key in its fact table, this 
can be supported.

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Commented] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread hejian (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826803#comment-16826803
 ] 

hejian commented on KYLIN-3967:
---

{code:java}
sum(case when derived_col='1' then measure_col else 0 end){code}
*derived_col*  is from lookup table and *measure_col* is ** a ** predefine ** 
measure.

I think this case should be supported, because case expression is base on 
further aggregations, and the way that derived column works as well?

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Created] (KYLIN-3982) Add measures without purging segments

2019-04-26 Thread Yuzhang QIU (JIRA)
Yuzhang QIU created KYLIN-3982:
--

 Summary: Add measures without purging segments
 Key: KYLIN-3982
 URL: https://issues.apache.org/jira/browse/KYLIN-3982
 Project: Kylin
  Issue Type: New Feature
  Components: Metadata, Query Engine, Tools, Build and Test
Affects Versions: v2.5.2
Reporter: Yuzhang QIU
Assignee: Yuzhang QIU


Here is the discussion

https://lists.apache.org/thread.html/44bf088f278d0ca3087bb8bdffda158534994d4c41be5405eb4699d8@%3Cdev.kylin.apache.org%3E



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


[jira] [Comment Edited] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Zhong Yanghong (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826760#comment-16826760
 ] 

Zhong Yanghong edited comment on KYLIN-3967 at 4/26/19 8:32 AM:


As for 
{code}
sum (case when col1 <0 then 0 else col1 end ) 
{code}
it's not supported, neither. 

It's not the limitation of https://issues.apache.org/jira/browse/KYLIN-3359. 
It's a limitation of Kylin. Kylin does not store raw data for measure columns. 
Therefore, we cannot do any filter on the measure columns.


was (Author: yaho):
As for 
{code}
(select case when col1 < 0 then 0 else col1 end as col1 from table)
{code}
it's not supported, neither. 

It's not the limitation of https://issues.apache.org/jira/browse/KYLIN-3359. 
It's a limitation of Kylin. Kylin does not store raw data for measure columns. 
Therefore, we cannot do any filter on the measure columns.

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Commented] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Zhong Yanghong (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826765#comment-16826765
 ] 

Zhong Yanghong commented on KYLIN-3967:
---

Yes, since we must predefine sum(col), which does not support lookup table 
columns.

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Commented] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread hejian (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826763#comment-16826763
 ] 

hejian commented on KYLIN-3967:
---

and it does't work when the col is from the lookup table?

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Commented] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Zhong Yanghong (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826760#comment-16826760
 ] 

Zhong Yanghong commented on KYLIN-3967:
---

As for 
{code}
(select case when col1 < 0 then 0 else col1 end as col1 from table)
{code}
it's not supported, neither. 

It's not the limitation of https://issues.apache.org/jira/browse/KYLIN-3359. 
It's a limitation of Kylin. Kylin does not store raw data for measure columns. 
Therefore, we cannot do any filter on the measure columns.

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Commented] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Zhong Yanghong (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826759#comment-16826759
 ] 

Zhong Yanghong commented on KYLIN-3967:
---

Hi [~gladson.vas],

https://issues.apache.org/jira/browse/KYLIN-3359 is not for the both cases you 
mentioned above.

If your sql contains sub-queries, only the inner-most query will be used to 
request kylin cube data. Then the results will be returned to Kylin server for 
further dealing with Calcite.

For the above two queries:

select sum(case
   when trans_id_alias in(11, 12, 13) then price_alias
   else 0
   end) as price_case_sum,
   part_dt_alias
from
{color:#f79232}  (select price as price_alias,
  trans_id as trans_id_alias,
  part_dt as part_dt_alias
   from kylin_sales
   where trans_id>10){color}
group by part_dt_alias
order by price_case_sum desc

select sum(case
   when trans_id_alias in(11, 12, 13) then price_alias
   else 0
   end) as price_case_sum,
   part_dt_alias
from
  (select price_alias,
  trans_id_alias,
  part_dt_alias
   from
{color:#f79232} (select price as price_alias,
 trans_id as trans_id_alias,
 part_dt as part_dt_alias
  from kylin_sales){color}
   where trans_id_alias>10)
group by part_dt_alias
order by price_case_sum desc

Only the brown part will use cube data. 

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[GitHub] [kylin] coveralls commented on issue #620: KYLIN-3981 Auto Merge Job failed to execute on windows

2019-04-26 Thread GitBox
coveralls commented on issue #620: KYLIN-3981 Auto Merge Job failed to execute 
on windows
URL: https://github.com/apache/kylin/pull/620#issuecomment-486968031
 
 
   ## Pull Request Test Coverage Report for [Build 
4424](https://coveralls.io/builds/23039140)
   
   * **1** of **1**   **(100.0%)**  changed or added relevant line in **1** 
file are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage remained the same at **27.81%**
   
   ---
   
   
   
   |  Totals | [![Coverage 
Status](https://coveralls.io/builds/23039140/badge)](https://coveralls.io/builds/23039140)
 |
   | :-- | --: |
   | Change from base [Build 4423](https://coveralls.io/builds/23036401): |  
0.0% |
   | Covered Lines: | 22751 |
   | Relevant Lines: | 81808 |
   
   ---
   #   - [Coveralls](https://coveralls.io)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [kylin] codecov-io commented on issue #620: KYLIN-3981 Auto Merge Job failed to execute on windows

2019-04-26 Thread GitBox
codecov-io commented on issue #620: KYLIN-3981 Auto Merge Job failed to execute 
on windows
URL: https://github.com/apache/kylin/pull/620#issuecomment-486968030
 
 
   # [Codecov](https://codecov.io/gh/apache/kylin/pull/620?src=pr=h1) Report
   > Merging [#620](https://codecov.io/gh/apache/kylin/pull/620?src=pr=desc) 
into 
[master](https://codecov.io/gh/apache/kylin/commit/c42aafd0bd58935b5ac5836103f05e5208e84ef2?src=pr=desc)
 will **not change** coverage.
   > The diff coverage is `0%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/kylin/pull/620/graphs/tree.svg?width=650=JawVgbgsVo=150=pr)](https://codecov.io/gh/apache/kylin/pull/620?src=pr=tree)
   
   ```diff
   @@Coverage Diff@@
   ## master #620   +/-   ##
   =
 Coverage 25.33%   25.33%   
 Complexity 5839 5839   
   =
 Files  1379 1379   
 Lines 8180881808   
 Branches  1146511465   
   =
 Hits  2072220722   
 Misses5906159061   
 Partials   2025 2025
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/kylin/pull/620?src=pr=tree) | Coverage Δ 
| Complexity Δ | |
   |---|---|---|---|
   | 
[...main/java/org/apache/kylin/common/KylinConfig.java](https://codecov.io/gh/apache/kylin/pull/620/diff?src=pr=tree#diff-Y29yZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2NvbW1vbi9LeWxpbkNvbmZpZy5qYXZh)
 | `35.88% <0%> (ø)` | `23 <0> (ø)` | :arrow_down: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/kylin/pull/620?src=pr=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/kylin/pull/620?src=pr=footer). Last 
update 
[c42aafd...f351244](https://codecov.io/gh/apache/kylin/pull/620?src=pr=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[jira] [Assigned] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Zhong Yanghong (JIRA)


 [ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhong Yanghong reassigned KYLIN-3967:
-

Assignee: (was: Zhong Yanghong)

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Assigned] (KYLIN-3967) sum along with case expression does not work in query

2019-04-26 Thread Zhong Yanghong (JIRA)


 [ 
https://issues.apache.org/jira/browse/KYLIN-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhong Yanghong reassigned KYLIN-3967:
-

Assignee: Zhong Yanghong

> sum along with case expression does not work in query
> -
>
> Key: KYLIN-3967
> URL: https://issues.apache.org/jira/browse/KYLIN-3967
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Assignee: Zhong Yanghong
>Priority: Blocker
> Attachments: notworkingcase.jpg, workingcase.jpg
>
>
> When i try to run a query with a sum case expression combination,
> eg: select sum(case when col1<0 then 0 else col1 end ) from table 
> i get the following error:
> No realization found for OLAPContext, CUBE_UNMATCHED_AGGREGATION[FunctionDesc 
> [expression=SUM, parameter=CASE(<($8, 0), 0, $8), returnType=null]], 
> rel#36838:OLAPTableScan.OLAP.[](table=[DEFAULT, table],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, 
> 100, 101, 102, 103, 104, 105, 106]) while executing SQL: "select sum (case 
> when col1 <0 then 0 else col1 end ) from table LIMIT 5"
>  
> is there any way to support this sum case expression in the query engine?
> Also I get the same error when the sum operation is done on a column derived 
> from a case expression in a subquery.
> eg: select sum(a.col1) from (select case when col1<0 then 0 else col1 end as 
> col1 from table) a
> Thanks,
> Gladson
>  



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


[jira] [Issue Comment Deleted] (KYLIN-3964) segment overlapped, the status is "NEW", last_build_job_id is null, can not refresh/delete/build this segment

2019-04-26 Thread hejian (JIRA)


 [ 
https://issues.apache.org/jira/browse/KYLIN-3964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

hejian updated KYLIN-3964:
--
Comment: was deleted

(was: ACID)

> segment overlapped, the status is "NEW", last_build_job_id is null, can not  
> refresh/delete/build this segment
> --
>
> Key: KYLIN-3964
> URL: https://issues.apache.org/jira/browse/KYLIN-3964
> Project: Kylin
>  Issue Type: Bug
> Environment: kylin-2.4.0
>Reporter: hejian
>Priority: Major
> Attachments: image-2019-04-22-10-07-06-737.png, 
> image-2019-04-23-16-51-34-805.png, image-2019-04-23-16-52-55-756.png
>
>
> *Any action* *involved* *this segment can not be excute by requesting api due 
> to no job_id provided.*
> !image-2019-04-22-10-07-06-737.png!
> merge/refresh/rebuild/delete does not work 
> !image-2019-04-23-16-51-34-805.png!!image-2019-04-23-16-52-55-756.png!



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


[jira] [Commented] (KYLIN-3966) Metric multiplication and metric division not working in query

2019-04-26 Thread hejian (JIRA)


[ 
https://issues.apache.org/jira/browse/KYLIN-3966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16826680#comment-16826680
 ] 

hejian commented on KYLIN-3966:
---

i think the measure columns can not be used directly without any measuring 
expression that you defined in building cube stage

> Metric multiplication and metric division not working in query
> --
>
> Key: KYLIN-3966
> URL: https://issues.apache.org/jira/browse/KYLIN-3966
> Project: Kylin
>  Issue Type: Bug
>  Components: Query Engine
>Reporter: Gladson Vas
>Priority: Blocker
>
> When i try to multiply or divide 2 metric columns in a query
> eg: select col1*col2 from table 
> select col1/col2 from table.
> it throws the following errors
> That both of the two sides of the BinaryTupleExpression own columns is not 
> supported for * while executing SQL
> That both of the two sides of the BinaryTupleExpression own columns is not 
> supported for / while executing SQL.
> But when i use the + or - operators in the query it seems to be working fine.
> Is there any way to support these 2 operators as well?
> Thanks,
> Gladson
>  



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