Unit 4: Running SQL Queries Using Spark SQL - Subjective Questions

INT315 — Cluster Computing • Practice Questions with Detailed Answers

20 questions

1

What is Spark SQL? Explain its importance in cluster computing.

2

Explain the main features of Spark SQL.

3

Describe the architecture and working process of Spark SQL.

4

What is a DataFrame in Spark SQL? How does it differ from an RDD?

5

Explain the different methods used to convert an RDD into a DataFrame.

6

Describe the reflection-based method for converting an RDD to a DataFrame. State its advantages and limitations.

7

Explain how an explicit schema can be used to convert an RDD of Row objects into a DataFrame.

8

What is a temporary view in Spark SQL? Explain how it is used to execute SQL queries on a DataFrame.

9

Explain the concept of joins in Spark SQL and describe the commonly used types of joins.

10

Compare inner join, left outer join, and full outer join in Spark SQL with suitable examples.

11

What is the purpose of the GROUP BY clause in Spark SQL? Explain its use with aggregate functions.

12

Explain the difference between WHERE and HAVING clauses in Spark SQL.

13

Describe the ORDER BY clause in Spark SQL. How does it differ from SORT BY?

14

Explain the aggregate functions supported by Spark SQL and give examples of their usage.

15

Derive a Spark SQL query to find the total sales, average sales, highest sale, and number of orders for each product. Explain the query.

16

What are SQL wildcards? Explain the use of the percent and underscore wildcards in Spark SQL.

17

Explain the LIKE operator in Spark SQL with suitable examples involving SQL wildcards.

18

Compare RDD, DataFrame, and Dataset APIs in Spark SQL.

19

Explain how Spark SQL optimizes queries. Discuss the roles of the Catalyst optimizer and Tungsten execution engine.

20

Describe the execution challenges associated with joins, GROUP BY, and ORDER BY operations in a distributed Spark SQL application.