Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 02, 2021
    • Jeff Evans's avatar
      Fixing Presto JDBC issues (#17265) · f4050ff1
      Jeff Evans authored
      Updating schema connection property to have proper display name
      
      Updating display name for database to be "Schema"
      
      Fixing `driver/can-connect?` impl in `presto_jdbc.clj` to actually use the correct driver, and dissoc `:engine` before calling the `sql-jdbc.conn` method
      
      Adding test for the `test-database-connection` method, which is what led to the error from the UI
      Unverified
      f4050ff1
  2. Jul 23, 2021
    • Jeff Evans's avatar
      Implement JDBC based Presto driver (#16194) · 80b46b1f
      Jeff Evans authored
      Implement JDBC based Presto driver
      
      Adding new Presto JDBC driver using the PrestoDB JDBC driver from `https://github.com/prestodb/presto`
      
      Marking the old Presto driver as being `superseded-by` the new one
      
      Pulling out common Presto code into new presto-common driver (modeled after the relationship between, ex: `googleanalytics` and `google)`
      
      Putting common QP/HoneySQL logic into the new (abstract) :presto-common driver
      
      Updating :presto driver to extend from the new common driver and only adding HTTP/REST API related methods
      
      Adding implementation of Presto JDBC driver, named :presto-jdbc, extending from :presto-common and :sql-jdbc
      
      Using com.facebook.presto/presto-jdbc as underlying JDBC driver dependency (since this is explicitly for Presto clusters, as opposed to Trino)
      
      Adapting code from the existing Presto driver where appropriate
      
      Adding new dependency-satisfied? implementation for :env-var, to allow for a plugin to require an env var be set, and making the Presto JDBC driver depend on that (specifically: `mb-enable-presto-jdbc-driver`)
      
      Adding CircleCI configuration to run against the newer Presto (0.254) Docker image
      
      Adding explicit ordering in a few tests where it was missing
      
      Fixing presto-type->base-type (timestamps were being synced as :type/Time because the regex pattern was wrong)
      
      Add tx/format-name test implementation for :presto-jdbc to lowercase table name
      
      Make modified test Oracle friendly
      
      Fixing bug parsing the `[:zone :time]` case within `metabase.util.date-2.parse/parse-with-formatter`; the offset is nil so it can't be passed directly in this case, so use the `standard-offset` fn (which was moved from `date-2` to `common` to get a standard offset for that zone
      
      Fixing more test failures by adding explicit ordering
      
      Changing sync to check whether the driver supports foreign keys before attempting to sync those (since drivers might throw an exception if attempting to check)
      
      Moving some common test dataset functionality between :presto and :presto-jdbc to a new test.data ns for :presto-common
      
      Adding HoneySQL form for :count-where, since we have to explicitly give a higher precision Decimal in order for Presto to not reduce the precision in results
      
      Put limit within subquery for `expression-using-aggregation-test` (since ordering from subquery is not guaranteed in Presto)
      
      Adding impls for ->prepared-substitution to handle substitutions for native query params
      
      Adding HoneySQL impls for `mod` (to do as "mod(x,y)" and `timestamp` (since it's a function with no parens to invoke) functions
      
      Adding various `sql.qp/date` impls that use the `AT TIME ZONE` operator to account for report tz, and make bucketing tests happy
      Unverified
      80b46b1f
Loading