Skip to content

Commit 5fbbb1a

Browse files
committed
Merge remote-tracking branch 'upstream/master' into vertica_driver
2 parents f5ecb77 + d4232d1 commit 5fbbb1a

File tree

170 files changed

+9326
-6308
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+9326
-6308
lines changed

CHANGELOG.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,66 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.31.1](https://github.com/cube-js/cube.js/compare/v0.31.0...v0.31.1) (2022-10-04)
7+
8+
9+
### Bug Fixes
10+
11+
* Cube not found for path due to FILTER_PARAMS are used in members ([#5417](https://github.com/cube-js/cube.js/issues/5417)) ([bfe76bf](https://github.com/cube-js/cube.js/commit/bfe76bfbf3bd5f51a408088f8f5fefb35e17e22f))
12+
* **extensions:** fix SELECT handling in the Funnels extensions ([#5397](https://github.com/cube-js/cube.js/issues/5397)) ([041f591](https://github.com/cube-js/cube.js/commit/041f591482cc75d840310a9b7592158c1b33fa37))
13+
* **playground:** bar chart pivot config ([36b9ec2](https://github.com/cube-js/cube.js/commit/36b9ec2f3de5ba3b6b047f3669f8e162321d854e))
14+
15+
16+
### Features
17+
18+
* **console-ui:** show error stack trace ([7ab15c6](https://github.com/cube-js/cube.js/commit/7ab15c6fbd46696d36c95f197711284d316c9f70))
19+
20+
21+
22+
23+
24+
# [0.31.0](https://github.com/cube-js/cube.js/compare/v0.30.75...v0.31.0) (2022-10-03)
25+
26+
27+
* feat!: Cube Views implementation (#5278) ([9937356](https://github.com/cube-js/cube.js/commit/99373563b610d1f15dfc44fafac0c329c1dc9a0d)), closes [#5278](https://github.com/cube-js/cube.js/issues/5278)
28+
29+
30+
### Bug Fixes
31+
32+
* **cubesql:** Allow derived tables to have a dot in column name ([#5391](https://github.com/cube-js/cube.js/issues/5391)) ([f83009c](https://github.com/cube-js/cube.js/commit/f83009cf193a6313296dddffa45bffa08ec01725))
33+
* **cubesql:** cast strings to timestamp ([#5331](https://github.com/cube-js/cube.js/issues/5331)) ([a706258](https://github.com/cube-js/cube.js/commit/a706258f85faa3f99150127a2c78f885e99e3aaf))
34+
* **cubesql:** Metabase - substring __user ([#5328](https://github.com/cube-js/cube.js/issues/5328)) ([a25c8bf](https://github.com/cube-js/cube.js/commit/a25c8bf3ddad9c589918b91f05df440eb31a2ad4))
35+
* **cubesql:** udf format_type prepared statement fix ([#5260](https://github.com/cube-js/cube.js/issues/5260)) ([307ed1b](https://github.com/cube-js/cube.js/commit/307ed1b6cc9b242e76d48241cb871b36f571f91e))
36+
* **cubesql:** WHERE Lower / Upper in list with multiply items ([#5376](https://github.com/cube-js/cube.js/issues/5376)) ([2269b2b](https://github.com/cube-js/cube.js/commit/2269b2bb41293107f8e8fca118218c56bf3eca53))
37+
* **cubestore:** Aggregate function MERGE not allowed for column type bytes ([#5166](https://github.com/cube-js/cube.js/issues/5166)) ([7626ed5](https://github.com/cube-js/cube.js/commit/7626ed5fa308854ba625f0956c29b21c84484b67))
38+
* **cubestore:** Fix error: Internal: channel closed on the next request after cubestore cloud process got OOM ([#5238](https://github.com/cube-js/cube.js/issues/5238)) ([cb81fdb](https://github.com/cube-js/cube.js/commit/cb81fdb79c5b768892831437659e1591773d8e15))
39+
* **postgres-driver:** release method should not throw ([#5395](https://github.com/cube-js/cube.js/issues/5395)) ([9423f46](https://github.com/cube-js/cube.js/commit/9423f46141eb73eaac24d9b16c449ff2dbc2918a))
40+
* **query-orchestrator:** pre-aggs build range queries cache key alignment ([#5377](https://github.com/cube-js/cube.js/issues/5377)) ([5896c4a](https://github.com/cube-js/cube.js/commit/5896c4aa4d5a469a892ca9f0e758dc5c6ef6c350))
41+
* **schema-compiler:** throw an error for the empty pre-aggs ([#5392](https://github.com/cube-js/cube.js/issues/5392)) ([4afd604](https://github.com/cube-js/cube.js/commit/4afd6041dae8175fb8d292e9ee0db15969239c81))
42+
43+
44+
### Features
45+
46+
* **cubesql:** Holistics - in dates list filter ([#5333](https://github.com/cube-js/cube.js/issues/5333)) ([94b6509](https://github.com/cube-js/cube.js/commit/94b650928a81be9ea203e50612ea194d9558b298))
47+
* **cubesql:** Support joins with distinct ([#5340](https://github.com/cube-js/cube.js/issues/5340)) ([da4304f](https://github.com/cube-js/cube.js/commit/da4304fef51e33d9c29627d9da92925569943083))
48+
* multiple data source ([#5326](https://github.com/cube-js/cube.js/issues/5326)) ([334af8c](https://github.com/cube-js/cube.js/commit/334af8c56cd02ae551844e9d1e9ab5e107fb1555))
49+
* **cubesql:** Add `float8`, `bool` casts ([b345ade](https://github.com/cube-js/cube.js/commit/b345ade898d6a0ec14e320d66129e985244cddb4))
50+
* **cubesql:** Allow `char_length` function to be used with cubes ([e99344f](https://github.com/cube-js/cube.js/commit/e99344f4e056ef6698f5d92c9e8b79801871a199))
51+
* **cubesql:** Allow filter by exact year (Tableau) ([#5367](https://github.com/cube-js/cube.js/issues/5367)) ([c31e59d](https://github.com/cube-js/cube.js/commit/c31e59d4763e0dd45e96b8e39eb9bcf914370eae))
52+
* **cubesql:** Holistics - support range of charts ([#5325](https://github.com/cube-js/cube.js/issues/5325)) ([d16b4c2](https://github.com/cube-js/cube.js/commit/d16b4c2dc0a582d8e28e48a1e5fae3ff2fe7b0de))
53+
* **cubesql:** Support `date_trunc` over column filter with `<=` ([b30d239](https://github.com/cube-js/cube.js/commit/b30d239ae4e00d8d547f0aa65b324f1f0d3af3f1))
54+
* **query-orchestrator:** introduce unload without temp table ([#5324](https://github.com/cube-js/cube.js/issues/5324)) ([3dcbd2e](https://github.com/cube-js/cube.js/commit/3dcbd2ed1d214d56bfde2183538fce3ec7d65595))
55+
* **testing:** databricks test suite ([#5311](https://github.com/cube-js/cube.js/issues/5311)) ([b77f33b](https://github.com/cube-js/cube.js/commit/b77f33ba9d804d8ca8746fe99d6050ebe26b4528))
56+
57+
58+
### BREAKING CHANGES
59+
60+
* The logic of how cubes are included in joins has been changed. There are multiple member reference constructs that are now forbidden and should be rewritten. You can't reference foreign cubes anymore to define members inside other cubes: `${ForeignCube}.foo`. `foo` member should be defined in `ForeignCube` and referenced as `${ForeignCube.foo}`. You also can't mix references and members without `CUBE` self-reference. For example `${ForeignCube.foo} + bar` is invalid and `${ForeignCube.foo} + ${CUBE}.bar` should be used instead. If not fixed, it'll lead to missing tables in the `FROM` clause.
61+
62+
63+
64+
65+
666
## [0.30.75](https://github.com/cube-js/cube.js/compare/v0.30.74...v0.30.75) (2022-09-22)
767

868

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CUBEJS_DB_HOST=github.demo.trial.altinity.cloud
2+
CUBEJS_DB_PORT=8443
3+
CUBEJS_DB_NAME=ontime
4+
CUBEJS_DB_USER=demo
5+
CUBEJS_DB_PASS=demo
6+
CUBEJS_DB_TYPE=clickhouse
7+
CUBEJS_API_SECRET=SECRET
8+
CUBEJS_DEV_MODE=true
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// Cube.js configuration options: https://cube.dev/docs/config
2+
3+
// NOTE: third-party dependencies and the use of require(...) are disabled for
4+
// CubeCloud users by default. Please contact support if you need them
5+
// enabled for your account. You are still allowed to require
6+
// @cubejs-backend/*-driver packages.
7+
8+
/**
9+
* Demo 1
10+
* Multi-tenancy with Data Sources
11+
*/
12+
// const clickhouseHost = process.env.CUBEJS_DB_HOST;
13+
// const clickhousePort = process.env.CUBEJS_DB_PORT;
14+
// const clickhouseDatabase = process.env.CUBEJS_DB_NAME;
15+
// const clickhouseUser = process.env.CUBEJS_DB_USER;
16+
// const clickhousePassword = process.env.CUBEJS_DB_PASS;
17+
// const mysqlHost = 'demo-mysql-rhodges.czuu1tdfcpyt.us-east-1.rds.amazonaws.com';
18+
// const mysqlPort = '3306';
19+
// const mysqlDatabase = 'test';
20+
// const mysqlUser = 'admin';
21+
// const mysqlPassword = 'YIDrkjMThI9ZHtdOfjj7';
22+
23+
module.exports = {
24+
/**
25+
* Demo 1
26+
* Multi-tenancy with Data Sources
27+
*/
28+
// driverFactory: ({ dataSource }) => {
29+
// if (dataSource === 'mysql') {
30+
// return {
31+
// type: 'mysql',
32+
// database: mysqlDatabase,
33+
// host: mysqlHost,
34+
// user: mysqlUser,
35+
// password: mysqlPassword,
36+
// port: mysqlPort,
37+
// };
38+
// } else {
39+
// return {
40+
// type: 'clickhouse',
41+
// database: clickhouseDatabase,
42+
// host: clickhouseHost,
43+
// user: clickhouseUser,
44+
// password: clickhousePassword,
45+
// port: clickhousePort,
46+
// };
47+
// }
48+
// },
49+
50+
51+
/**
52+
* Demo 2
53+
* Multi-tenancy with Security Context
54+
*/
55+
// // Provides distinct identifiers for each datasource which are used as caching keys
56+
// contextToAppId: ({ securityContext }) =>
57+
// `CUBEJS_APP_${securityContext.dataSource}`,
58+
59+
// contextToOrchestratorId: ({ securityContext }) =>
60+
// `CUBEJS_APP_${securityContext.dataSource}`,
61+
62+
// // Selects the database connection configuration based on the datasource name
63+
// driverFactory: ({ securityContext }) => {
64+
// if (!securityContext.dataSource) {
65+
// throw new Error('No dataSource found in Security Context!');
66+
// }
67+
68+
// if (securityContext.dataSource === 'mysql') {
69+
// return {
70+
// type: 'postgres', // replace with mysql once we get an endpoint
71+
// database: mysqlDatabase,
72+
// host: mysqlHost,
73+
// user: mysqlUser,
74+
// password: mysqlPassword,
75+
// port: mysqlPort,
76+
// };
77+
// } else if (securityContext.dataSource === 'clickhouse') {
78+
// return {
79+
// type: 'clickhouse',
80+
// database: clickhouseDatabase,
81+
// host: clickhouseHost,
82+
// user: clickhouseUser,
83+
// password: clickhousePassword,
84+
// port: clickhousePort,
85+
// };
86+
// }
87+
88+
// throw new Error('Unknown dataSource in Security Context!');
89+
// },
90+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "wikipedia-outliers",
3+
"version": "1.0.0",
4+
"license": "MIT",
5+
"scripts": {
6+
"dev": "parcel src/index.html",
7+
"build": "parcel build src/index.html"
8+
},
9+
"devDependencies": {
10+
"buffer": "^6.0.3",
11+
"crypto-browserify": "^3.12.0",
12+
"events": "^3.3.0",
13+
"parcel": "^2.6.2",
14+
"process": "^0.11.10",
15+
"stream-browserify": "^3.0.0",
16+
"util": "^0.12.4"
17+
},
18+
"dependencies": {
19+
"@cube-dev/example-wrapper": "^1.1.10",
20+
"@cubejs-client/core": "^0.30.74",
21+
"@nivo/bar": "^0.80.0",
22+
"@nivo/colors": "^0.79.1",
23+
"@nivo/core": "^0.80.0",
24+
"jsonwebtoken": "^8.5.1",
25+
"moment": "^2.29.4",
26+
"numeral": "^2.0.6",
27+
"prop-types": "^15.8.1",
28+
"react": "^18.2.0",
29+
"react-dom": "^18.2.0"
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { ResponsiveBar } from '@nivo/bar'
2+
import {
3+
colors,
4+
numberFormatter,
5+
dateFormatter,
6+
ticksFormmater,
7+
} from '../utils/utils'
8+
9+
const BarChart = ({ data /* see data tab */ }) => {
10+
return (
11+
<ResponsiveBar
12+
enableLabel={false}
13+
colors={colors}
14+
data={data.chartPivot()}
15+
keys={data.seriesNames().map(seriesName => seriesName.key)}
16+
indexBy='x'
17+
enableGridY={false}
18+
padding={0.3}
19+
margin={{ top: 60, bottom: 60, left: 40 }}
20+
axisLeft={{
21+
format: numberFormatter
22+
}}
23+
axisBottom={{
24+
format: value =>
25+
ticksFormmater(20, value, data.chartPivot(), dateFormatter)
26+
}}
27+
tooltip={({ id, value, color }) => (
28+
<strong style={{ color, backgroundColor: 'white', padding: '5px', borderRadius: '5px' }}>
29+
{id.split(",")[0]}: {numberFormatter(value)}
30+
</strong>
31+
)}
32+
legends={[
33+
{
34+
anchor: "bottom",
35+
direction: "row",
36+
translateY: 50,
37+
itemsSpacing: 2,
38+
itemWidth: 150,
39+
itemHeight: 20,
40+
itemDirection: "left-to-right"
41+
}
42+
]}
43+
/>
44+
)
45+
}
46+
47+
export default BarChart;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as classes from './LoadingIndicator.module.css'
2+
3+
function LoadingIndicator() {
4+
return <div style={{display: 'flex', justifyContent: 'center', marginTop: '50px'}}><div className={classes.ldsring}><div></div><div></div><div></div><div></div></div></div>;
5+
}
6+
7+
export default LoadingIndicator
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.ldsring {
2+
display: inline-block;
3+
position: relative;
4+
width: 80px;
5+
height: 80px;
6+
}
7+
.ldsring div {
8+
box-sizing: border-box;
9+
display: block;
10+
position: absolute;
11+
width: 64px;
12+
height: 64px;
13+
margin: 8px;
14+
border: 8px solid hsl(342deg 100% 70%);
15+
border-radius: 50%;
16+
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
17+
border-color: hsl(342deg 100% 70%) transparent transparent transparent;
18+
}
19+
.ldsring div:nth-child(1) {
20+
animation-delay: -0.45s;
21+
}
22+
.ldsring div:nth-child(2) {
23+
animation-delay: -0.3s;
24+
}
25+
.ldsring div:nth-child(3) {
26+
animation-delay: -0.15s;
27+
}
28+
@keyframes lds-ring {
29+
0% {
30+
transform: rotate(0deg);
31+
}
32+
100% {
33+
transform: rotate(360deg);
34+
}
35+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<title></title>
5+
</head>
6+
<body>
7+
<div id="app"></div>
8+
<script type="module" src="index.js"></script>
9+
10+
<script type="module">
11+
import createExampleWrapper from "@cube-dev/example-wrapper";
12+
13+
createExampleWrapper({
14+
title: "ClickHouse vs. MySQL, built with Cube and using multi-tenancy",
15+
text: `
16+
<p>
17+
This sample data app displays airline data from the Bureau of Transportation Statistics by comparing the performance between MySQL and ClickHouse.
18+
</p>
19+
<p>Changing the Data Source will edit the payload of the JWT token to configure which data source to fetch data from.</p>
20+
<div>You can decode the token at <a href='https://jwt.io' target='_blank' rel='noreferrer'>jwt.io</a></div>
21+
`,
22+
});
23+
</script>
24+
</body>
25+
</html>

0 commit comments

Comments
 (0)