Defining Value Data Type in Presto

I get values ​​from nested maps, and it's hard to understand what data type each value has. Is there a function typeofthat can tell me the data type for each value?

+6
source share
1 answer

Yes, there is a function : typeof

presto> select typeof(1), typeof('a');
  _col0  |   _col1
---------+------------
 integer | varchar(1)
(1 row)
+3
source

Source: https://habr.com/ru/post/1677949/


All Articles