Skip to Content
Apache Hive Cookbook
book

Apache Hive Cookbook

by Hanish Bansal, Saurabh Chauhan, Shrey Mehrotra
April 2016
Beginner content levelBeginner
268 pages
5h 32m
English
Packt Publishing
Content preview from Apache Hive Cookbook

Using string data types

Hive supports three types of String data type, STRING, VARCHAR, and CHAR:

  • STRING: It is a sequence of characters that can be expressed using single quotes (') as well as double quotes (").
  • VARCHAR: It is variable-length character type. It is defined using a length specifier, which specifies the maximum number of characters allowed in the character string. Its syntax is VARCHAR(max_length). The value of the varchar data type gets truncated during processing if necessary to fit within the specified length. While converting the string value to the varchar value, if a string value exceeds the length specifier, then the string gets silently truncated. The maximum length of varchar type is 65355.
  • CHAR: It is fixed-length character ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Introduction to Apache Hive

Introduction to Apache Hive

Tom Hanlon

Publisher Resources

ISBN: 9781782161080Supplemental Content