[ https://issues.apache.org/jira/browse/HIVE-19586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16492259#comment-16492259 ]
Hive QA commented on HIVE-19586: -------------------------------- Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12925144/HIVE-19586.4.patch {color:red}ERROR:{color} -1 due to build exiting with an error Test results: https://builds.apache.org/job/PreCommit-HIVE-Build/11278/testReport Console output: https://builds.apache.org/job/PreCommit-HIVE-Build/11278/console Test logs: http://104.198.109.242/logs/PreCommit-HIVE-Build-11278/ Messages: {noformat} Executing org.apache.hive.ptest.execution.TestCheckPhase Executing org.apache.hive.ptest.execution.PrepPhase Tests exited with: NonZeroExitCodeException Command 'bash /data/hiveptest/working/scratch/source-prep.sh' failed with exit status 1 and output '+ date '+%Y-%m-%d %T.%3N' 2018-05-28 04:26:57.868 + [[ -n /usr/lib/jvm/java-8-openjdk-amd64 ]] + export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 + JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 + export PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + PATH=/usr/lib/jvm/java-8-openjdk-amd64/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + export 'ANT_OPTS=-Xmx1g -XX:MaxPermSize=256m ' + ANT_OPTS='-Xmx1g -XX:MaxPermSize=256m ' + export 'MAVEN_OPTS=-Xmx1g ' + MAVEN_OPTS='-Xmx1g ' + cd /data/hiveptest/working/ + tee /data/hiveptest/logs/PreCommit-HIVE-Build-11278/source-prep.txt + [[ false == \t\r\u\e ]] + mkdir -p maven ivy + [[ git = \s\v\n ]] + [[ git = \g\i\t ]] + [[ -z master ]] + [[ -d apache-github-source-source ]] + [[ ! -d apache-github-source-source/.git ]] + [[ ! -d apache-github-source-source ]] + date '+%Y-%m-%d %T.%3N' 2018-05-28 04:26:57.871 + cd apache-github-source-source + git fetch origin + git reset --hard HEAD HEAD is now at 43945fb Vectorization: Turning on vectorization in escape_crlf produces wrong results (Haifeng Chen, reviewed by Matt McCline) + git clean -f -d + git checkout master Already on 'master' Your branch is up-to-date with 'origin/master'. + git reset --hard origin/master HEAD is now at 43945fb Vectorization: Turning on vectorization in escape_crlf produces wrong results (Haifeng Chen, reviewed by Matt McCline) + git merge --ff-only origin/master Already up-to-date. + date '+%Y-%m-%d %T.%3N' 2018-05-28 04:26:59.066 + rm -rf ../yetus_PreCommit-HIVE-Build-11278 + mkdir ../yetus_PreCommit-HIVE-Build-11278 + git gc + cp -R . ../yetus_PreCommit-HIVE-Build-11278 + mkdir /data/hiveptest/logs/PreCommit-HIVE-Build-11278/yetus + patchCommandPath=/data/hiveptest/working/scratch/smart-apply-patch.sh + patchFilePath=/data/hiveptest/working/scratch/build.patch + [[ -f /data/hiveptest/working/scratch/build.patch ]] + chmod +x /data/hiveptest/working/scratch/smart-apply-patch.sh + /data/hiveptest/working/scratch/smart-apply-patch.sh /data/hiveptest/working/scratch/build.patch error: patch failed: ql/src/test/queries/clientpositive/druidmini_expressions.q:51 Falling back to three-way merge... Applied patch to 'ql/src/test/queries/clientpositive/druidmini_expressions.q' with conflicts. error: patch failed: ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out:257 Falling back to three-way merge... Applied patch to 'ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out' with conflicts. Going to apply patch with: git apply -p0 /data/hiveptest/working/scratch/build.patch:531: trailing whitespace. Map 1 /data/hiveptest/working/scratch/build.patch:557: trailing whitespace. Reducer 2 /data/hiveptest/working/scratch/build.patch:599: trailing whitespace. Map 1 /data/hiveptest/working/scratch/build.patch:625: trailing whitespace. Reducer 2 /data/hiveptest/working/scratch/build.patch:667: trailing whitespace. Map 1 error: patch failed: ql/src/test/queries/clientpositive/druidmini_expressions.q:51 Falling back to three-way merge... Applied patch to 'ql/src/test/queries/clientpositive/druidmini_expressions.q' with conflicts. error: patch failed: ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out:257 Falling back to three-way merge... Applied patch to 'ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out' with conflicts. U ql/src/test/queries/clientpositive/druidmini_expressions.q U ql/src/test/results/clientpositive/druid/druidmini_expressions.q.out warning: squelched 12 whitespace errors warning: 17 lines add whitespace errors. + exit 1 ' {noformat} This message is automatically generated. ATTACHMENT ID: 12925144 - PreCommit-HIVE-Build > Optimize Count(distinct X) pushdown based on the storage capabilities > ---------------------------------------------------------------------- > > Key: HIVE-19586 > URL: https://issues.apache.org/jira/browse/HIVE-19586 > Project: Hive > Issue Type: Improvement > Components: Druid integration, Logical Optimizer > Reporter: slim bouguerra > Assignee: slim bouguerra > Priority: Major > Attachments: HIVE-19586.2.patch, HIVE-19586.3.patch, > HIVE-19586.3.patch, HIVE-19586.4.patch, HIVE-19586.patch > > > h1. Goal > Provide a way to rewrite queries with combination of COUNT(Distinct) and > Aggregates like SUM as a series of Group By. > This can be useful to push down to Druid queries like > {code} > select count(DISTINCT interval_marker), count (distinct dim), sum(num_l) > FROM druid_test_table GROUP BY `__time`, `zone` ; > {code} > In general this can be useful to be used in cases where storage handlers can > not perform count (distinct column) > h1. How to do it. > Use the Calcite rule {code} > org.apache.calcite.rel.rules.AggregateExpandDistinctAggregatesRule{code} that > breaks down Count distinct to a single Group by with Grouping sets or > multiple series of Group by that might be linked with Joins if multiple > counts are present. > FYI today Hive does have a similar rule {code} > org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveExpandDistinctAggregatesRule{code}, > but it only provides a rewrite to Grouping sets based plan. > I am planing to use the actual Calcite rule, [~ashutoshc] any concerns or > caveats to be aware of? > h2. Concerns/questions > Need to have a way to switch between Grouping sets or Simple chained group by > based on the plan cost. For instance for Druid based scan it makes always > sense (at least today) to push down a series of Group by and stitch result > sets in Hive later (as oppose to scan everything). > But this might be not true for other storage handler that can handle Grouping > sets it is better to push down the Grouping sets as one table scan. > Am still unsure how i can lean on the cost optimizer to select the best plan, > [~ashutoshc]/[~jcamachorodriguez] any inputs? -- This message was sent by Atlassian JIRA (v7.6.3#76005)