Concepedia

TLDR

Spark SQL is a new module in Apache Spark that integrates relational processing with Spark's functional programming API. Spark SQL aims to add tighter integration between relational and procedural processing and a highly extensible optimizer. It achieves this via a declarative DataFrame API that integrates with procedural Spark code and the Catalyst optimizer built in Scala, enabling composable rules, code generation control, and extension points. Spark SQL provides features such as schema inference for JSON, machine learning types, and query federation to external databases, positioning it as an evolution of SQL‑on‑Spark and Spark itself with richer APIs and optimizations.

Abstract

Spark SQL is a new module in Apache Spark that integrates relational processing with Spark's functional programming API. Built on our experience with Shark, Spark SQL lets Spark programmers leverage the benefits of relational processing (e.g. declarative queries and optimized storage), and lets SQL users call complex analytics libraries in Spark (e.g. machine learning). Compared to previous systems, Spark SQL makes two main additions. First, it offers much tighter integration between relational and procedural processing, through a declarative DataFrame API that integrates with procedural Spark code. Second, it includes a highly extensible optimizer, Catalyst, built using features of the Scala programming language, that makes it easy to add composable rules, control code generation, and define extension points. Using Catalyst, we have built a variety of features (e.g. schema inference for JSON, machine learning types, and query federation to external databases) tailored for the complex needs of modern data analysis. We see Spark SQL as an evolution of both SQL-on-Spark and of Spark itself, offering richer APIs and optimizations while keeping the benefits of the Spark programming model.

References

YearCitations

Page 1