
- Hive - Home
- Hive - Introduction
- Hive - Installation
- Hive - Data Types
- Hive - Create Database
- Hive - Drop Database
- Hive - Create Table
- Hive - Alter Table
- Hive - Drop Table
- Hive - Partitioning
- Hive - Built-In Operators
- Hive - Built-In Functions
- Hive - Views And Indexes
- Hive Useful Resources
- Hive - Questions and Answers
- Hive - Quick Guide
- Hive - Useful Resources
Hive Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Hive. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Q 1 - Each database created in hive is stored as
Answer : A
Explanation
Each database becomes a directory and each table becomes a file in that directory
Q 2 - If the database contains some tables then it can be forced to drop without dropping the tables by using the keyword
Answer : D
Explanation
CASCADE clause drops the table first before dropping the database
Q 3 - If the directory for a partition does not exist, and a query is executed for this partition then
B - mapreduce job is not triggered
Answer : D
Explanation
The map reduce job is triggered but no result will be returned.
Q 4 - While querying a hive table for a Array type column, if the array index is nonexistent then
Answer : A
Explanation
Hive returns NULL while in java it would have returned index out of bound error
Q 5 - The below expression in the where clause
RLIKE '.*(Chicago|Ontario).*';
gives the result which match
A - words containing both Chicago and Ontario
B - words containing either Chicago or Ontario
Answer : B
Explanation
Hive supports java based regular expression for querying.
Q 6 - Which kind of keys(CONSTRAINTS) Hive can have?
Answer : D
Explanation
Hive is schema on read and unlike RDBMS it does not have a way to enforce the existence of keys.
Q 7 - The clause " WITH DEFERRED REBUILD" while creating an index
A - creates index on a table which is yet to be created
B - creates index on a table which has no data
Answer : D
Explanation
It is about creating index on an empty table.
Q 8 - Which of the following hint is used to optimize the join queries
A - /* joinlast(table_name) */
B - /* joinfirst(table_name) */
Answer : C
Explanation
Streaming a table of small size makes the query faster.
Q 9 - The command to list the functions currently loaded in a Hive Session is
Answer : B
Explanation
SHOW FUNCTIONS produces list of all the functions currently available in hive session
Q 10 - The UDF can access files inside
Answer : D
Explanation
All the listed filesystem can be accessed using UDF