Skip to content
Snippets Groups Projects
  • Herman van Hovell's avatar
    74ac1c43
    [SPARK-17717][SQL] Add exist/find methods to Catalog. · 74ac1c43
    Herman van Hovell authored
    ## What changes were proposed in this pull request?
    The current user facing catalog does not implement methods for checking object existence or finding objects. You could theoretically do this using the `list*` commands, but this is rather cumbersome and can actually be costly when there are many objects. This PR adds `exists*` and `find*` methods for Databases, Table and Functions.
    
    ## How was this patch tested?
    Added tests to `org.apache.spark.sql.internal.CatalogSuite`
    
    Author: Herman van Hovell <hvanhovell@databricks.com>
    
    Closes #15301 from hvanhovell/SPARK-17717.
    74ac1c43
    History
    [SPARK-17717][SQL] Add exist/find methods to Catalog.
    Herman van Hovell authored
    ## What changes were proposed in this pull request?
    The current user facing catalog does not implement methods for checking object existence or finding objects. You could theoretically do this using the `list*` commands, but this is rather cumbersome and can actually be costly when there are many objects. This PR adds `exists*` and `find*` methods for Databases, Table and Functions.
    
    ## How was this patch tested?
    Added tests to `org.apache.spark.sql.internal.CatalogSuite`
    
    Author: Herman van Hovell <hvanhovell@databricks.com>
    
    Closes #15301 from hvanhovell/SPARK-17717.