Skip to content

Commit

Permalink
Merge pull request #8 from databendcloud/chore/test-ci
Browse files Browse the repository at this point in the history
chore: test ci
  • Loading branch information
hantmac authored Oct 14, 2023
2 parents 0ce46c6 + 85097f6 commit ef97db2
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 34 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "18"
cache: "yarn"

- name: Get M2 cache
Expand All @@ -71,16 +71,6 @@ jobs:
~/.gitlibs
key: ${{ runner.os }}-databend-${{ hashFiles('**/deps.edn') }}

- name: Prepare stuff for pulses
run: yarn build-static-viz

# Use custom deps.edn containing "user/databend" alias to include driver sources
- name: Run tests
run: |
mkdir -p /home/runner/.config/clojure
cat modules/drivers/databend/.github/deps.edn | sed -e "s|PWD|$PWD|g" > /home/runner/.config/clojure/deps.edn
DRIVERS=databend clojure -X:dev:drivers:drivers-dev:test:user/databend
- name: Build databend driver
run: |
echo "{:deps {metabase/databend {:local/root \"databend\" }}}" > modules/drivers/deps.edn
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
\#*\#
.\#*
.idea
plugins
metabase.db.*
repo
metabase.db*
.idea
.\#*
/target
*.jar
*.class
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7cf1e2260ce733914fbda4eb03de5aaf
facc82a7ece33f0903c83309027ff14c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fb5bbe297ad514f9e4e872fa38f90841c233a0da
61e87dcad4d9b35cdfb8081ed236b6928bfda75b
79 changes: 73 additions & 6 deletions repo/com/databend/metabase-core/1.40/metabase-core-1.40.pom
Original file line number Diff line number Diff line change
@@ -1,8 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.databend</groupId>
<artifactId>metabase-core</artifactId>
<version>1.40</version>
<groupId>amalloy</groupId>
<artifactId>ring-buffer</artifactId>
<packaging>jar</packaging>
<version>1.3.1</version>
<name>ring-buffer</name>
<description>Persistent bounded-size queue implementation in Clojure</description>
<url>https://github.com/clj-commons/ring-buffer</url>
<licenses>
<license>
<name>Eclipse Public License</name>
<url>http://www.eclipse.org/legal/epl-v10.html</url>
</license>
</licenses>
<scm>
<tag>ef3635c71182eac1b6ecfa216c14adf90fabd28e</tag>
</scm>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>resources</directory>
</testResource>
</testResources>
<directory>target</directory>
<outputDirectory>target/classes</outputDirectory>
<plugins/>
</build>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>clojars</id>
<url>https://repo.clojars.org/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<dependencyManagement>
<dependencies/>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.10.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojurescript</artifactId>
<version>1.10.520</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fd42f6157d0eef990d739f21e25520a8
419561bf2a35cfa4ece195698b6a6640
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e75e0dc9140e2eb7c1af88ece3a7fecd714767a2
8a10de8a144faafe7dd71decc36e0a2d9dc7af2e
2 changes: 1 addition & 1 deletion repo/com/databend/metabase-core/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<versions>
<version>1.40</version>
</versions>
<lastUpdated>20230317023827</lastUpdated>
<lastUpdated>20231014034123</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion repo/com/databend/metabase-core/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
371ea870234aedbcf314c6e94e149d12
9ca143d9e2fde3541005a0b7674e2a6d
2 changes: 1 addition & 1 deletion repo/com/databend/metabase-core/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d46595bf4e0f766300336b800696734d2957d77c
6e8ca1750860443ccaac7b8a0006d79615f889ce
8 changes: 1 addition & 7 deletions src/metabase/driver/databend.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
[metabase [config :as config] [driver :as driver] [util :as u]]
[metabase.driver.ddl.interface :as ddl.i]
[metabase.driver.sql.util :as sql.u]
[metabase.driver
[common :as driver.common]]
[metabase.driver.sql-jdbc [common :as sql-jdbc.common]
[connection :as sql-jdbc.conn] [execute :as sql-jdbc.execute]
[sync :as sql-jdbc.sync]]
Expand Down Expand Up @@ -184,10 +182,6 @@
updated-field)]
(merge table-metadata {:fields (set filtered-fields)})))

; Return a native query that will fetch the current time
(defmethod driver.common/current-db-time-native-query :databend [_]
"SELECT CAST(CAST(NOW() AS TIMESTAMP) AS VARCHAR(24))")

(defn- to-start-of-year
[expr]
(hsql/call :to_start_of_year (hsql/call :TO_DATETIME expr)))
Expand Down Expand Up @@ -425,4 +419,4 @@
(defmethod driver/db-start-of-week :databend [_] :monday)

(defmethod ddl.i/format-name :databend [_ table-or-field-name]
(u/->snake_case_en table-or-field-name))
(str/replace table-or-field-name #"-" "_"))

0 comments on commit ef97db2

Please sign in to comment.