[
https://issues.apache.org/jira/browse/HIVE-24446?focusedWorklogId=521546&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-521546
]
ASF GitHub Bot logged work on HIVE-24446:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Dec/20 05:45
Start Date: 08/Dec/20 05:45
Worklog Time Spent: 10m
Work Description: kasakrisz merged pull request #1717:
URL: https://github.com/apache/hive/pull/1717
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 521546)
Time Spent: 20m (was: 10m)
> Materialized View plan alters explicit cast type in query
> ---------------------------------------------------------
>
> Key: HIVE-24446
> URL: https://issues.apache.org/jira/browse/HIVE-24446
> Project: Hive
> Issue Type: Bug
> Components: Materialized views, Types
> Affects Versions: 4.0.0
> Reporter: Krisztian Kasa
> Assignee: Krisztian Kasa
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {code:java}
> create materialized view mv_tv_view_data_av2 stored as orc TBLPROPERTIES
> ('transactional'='true') as
> select
> total_views `total_views`,
> sum(cast(1.5 as decimal(9,4))) over (order by total_views) as quartile,
> program
> from tv_view_data;
> {code}
> {code:java}
> LogicalProject(quartile=[CAST($0):DECIMAL(12, 1)], total=[$1])
> HiveTableScan(table=[[arc_view, mv_tv_view_data_av1]],
> table:alias=[mv_tv_view_data_av1])
> {code}
> Some constant decimal values are not padded in the result set.
> {code}
> select
> POSTHOOK: query: select
> t.quartile,
> t.quartile,
> max(t.total_views) total
> max(t.total_views) total
> from wealth t2,
> from wealth t2,
> (select
> (select
> total_views `total_views`,
> total_views `total_views`,
> sum(cast(1.5 as decimal(9,4))) over (order by total_views) as quartile,
> sum(cast(1.5 as decimal(9,4))) over (order by total_views) as quartile,
> program
> program
> from tv_view_data) t
> from tv_view_data) t
> where t.program=t2.watches
> where t.program=t2.watches
> group by quartile
> group by quartile
> order by quartile
> {code}
> {code}
> 1.5 1300000
> 4.5 15000000
> 6.0 20000000
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)