Difference between Spark SQL and Hive

bookmark

Spark SQL Hive
Part of the Apache Spark ecosystem Part of the Apache Hadoop ecosystem
Provides SQL and DataFrame APIs Provides SQL-like HiveQL and HCatalog
Optimized for in-memory processing Primarily works with disk-based storage
Supports both batch and real-time Primarily used for batch processing
processing  
Offers better performance May suffer from latency issues due to disk I/O
Supports various data sources Focuses on Hadoop-based data sources