Skip to content
Snippets Groups Projects
Unverified Commit e292d309 authored by metamben's avatar metamben Committed by GitHub
Browse files

Update vertica (#27705)

Use the vertica/vertica-ce:12.0.2-0 image.
parent 8a961542
Branches
Tags
No related merge requests found
......@@ -663,15 +663,13 @@ jobs:
DRIVERS: vertica
services:
vertica:
image: sumitchawla/vertica
image: vertica/vertica-ce:12.0.2-0
ports:
- "5433:5433"
steps:
- uses: actions/checkout@v3
- name: Make plugins directory
run: mkdir plugins
- name: Fetch JDBC driver
run: wget --output-document=plugins/vertica-jdbc-7.1.2-0.jar ${{ secrets.VERTICA_JDBC_JAR }}
- name: Test Vertica driver
uses: ./.github/actions/test-driver
with:
......
......@@ -2,7 +2,7 @@
["src" "resources-ee"]
:deps
{com.vertica.jdbc/vertica-jdbc {:mvn/version "10.0.1-0"}}
{com.vertica.jdbc/vertica-jdbc {:mvn/version "12.0.3-0"}}
:aliases
{:oss
......
......@@ -38,7 +38,7 @@
(defmethod sql.tx/field-base-type->sql-type [:vertica base-type] [_ _] sql-type))
(defn- db-name []
(tx/db-test-env-var-or-throw :vertica :db "docker"))
(tx/db-test-env-var-or-throw :vertica :db "VMart"))
(def ^:private db-connection-details
(delay {:host (tx/db-test-env-var-or-throw :vertica :host "localhost")
......
......@@ -32,14 +32,22 @@
[:ends-with $name "t"]]]]]})))))
(testing "empty results"
;; due to a bug in the Mongo counts are returned as empty when there are no results (#5419)
(is (= (if (= driver/*driver* :mongo)
[]
[[nil]])
(mt/rows
(mt/run-mbql-query venues
{:aggregation [[:share [:< $price 4]]]
:filter [:> $price Long/MAX_VALUE]})))))))
;; Vertica doesn't allow dividing null by zero
;; TODO consider wrapping all divisions in nullif checking the first argument
(if (= driver/*driver* :vertica)
(is (thrown-with-msg?
clojure.lang.ExceptionInfo #"Division by zero"
(mt/run-mbql-query venues
{:aggregation [[:share [:< $price 4]]]
:filter [:> $price Long/MAX_VALUE]})))
;; due to a bug in the Mongo counts are returned as empty when there are no results (#5419)
(is (= (if (= driver/*driver* :mongo)
[]
[[nil]])
(mt/rows
(mt/run-mbql-query venues
{:aggregation [[:share [:< $price 4]]]
:filter [:> $price Long/MAX_VALUE]}))))))))
(deftest segments-metrics-test
(mt/test-drivers (mt/normal-drivers-with-feature :basic-aggregations)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment