Spark can be enhanced with data warehouse capabilities to leverage both open source analytics and enterprise data warehouse strengths. This includes incorporating star schema detection and referential integrity constraints to optimize queries. Performance can be improved by pushing down operations like joins, filters, and projections from Spark to underlying data sources using heuristics like star schema patterns. Push downs allow exploiting database indexes and reducing data transfer. Star schema detection and join push downs have shown speedups of 2-31x on TPC-DS benchmark queries.