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

Support Hive VIEW with CAST to decimal #6450

Open
findepi opened this issue Dec 28, 2020 · 1 comment
Open

Support Hive VIEW with CAST to decimal #6450

findepi opened this issue Dec 28, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@findepi
Copy link
Member

findepi commented Dec 28, 2020

it looks like casting a column to any decimal precision is translated to decimal(10,0).

Hive:

hive> create view decimal_view as select cast(a as decimal (6,2)) b from dect;
OK
hive> show create table decimal_view;
OK
CREATE VIEW `decimal_view` AS select cast(`dect`.`a` as decimal (6,2)) `b` from `newschema`.`dect`

Presto:

presto> show create view decimal_view;
                Create View                 
--------------------------------------------
 CREATE VIEW hive.newschema.decimal_view AS 
 SELECT CAST("a" AS DECIMAL(10, 0)) "b"     
 FROM                                       
   "newschema"."dect"    
@findepi
Copy link
Member Author

findepi commented Dec 28, 2020

Since it worked in Presto 344, i am marking this as a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
1 participant