Skip to content
Advertisement

Hive QL Declaration

What is the difference between CHAR() and VARCHAR() declarations from HQL?

Advertisement

Answer

VARCHAR holds the advantage since variable-length data would produce smaller rows and, thus, smaller physical files.

CHAR fields require less string manipulation because of fixed field widths. Partiton, lookup, join, group on CHAR field are faster than VARCHAR fields.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement