Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-19842

Informational Referential Integrity Constraints Support in Spark

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0
    • Fix Version/s: None
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      Description

      Informational Referential Integrity Constraints Support in Spark

      This work proposes support for informational primary key and foreign key (referential integrity) constraints in Spark. The main purpose is to open up an area of query optimization techniques that rely on referential integrity constraints semantics.

      An informational or statistical constraint is a constraint such as a unique, primary key, foreign key, or check constraint, that can be used by Spark to improve query performance. Informational constraints are not enforced by the Spark SQL engine; rather, they are used by Catalyst to optimize the query processing. They provide semantics information that allows Catalyst to rewrite queries to eliminate joins, push down aggregates, remove unnecessary Distinct operations, and perform a number of other optimizations. Informational constraints are primarily targeted to applications that load and analyze data that originated from a data warehouse. For such applications, the conditions for a given constraint are known to be true, so the constraint does not need to be enforced during data load operations.

      The attached document covers constraint definition, metastore storage, constraint validation, and maintenance. The document shows many examples of query performance improvements that utilize referential integrity constraints and can be implemented in Spark.

      Link to the google doc: InformationalRIConstraints

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ioana-delaney Ioana Delaney
              • Votes:
                0 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated: