Skip to content

Commit

Permalink
Merge branch 'master' into chore-extended-cache-log
Browse files Browse the repository at this point in the history
  • Loading branch information
RusovDmitriy committed Aug 23, 2023
2 parents bfbdf8a + ac7d1a8 commit 1435ca2
Show file tree
Hide file tree
Showing 141 changed files with 2,487 additions and 1,233 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust-cubesql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
env:
CUBESQL_TESTING_CUBE_TOKEN: ${{ secrets.CUBESQL_TESTING_CUBE_TOKEN }}
CUBESQL_TESTING_CUBE_URL: ${{ secrets.CUBESQL_TESTING_CUBE_URL }}
CUBESQL_SQL_PUSH_DOWN: true
run: cd rust/cubesql && cargo test

native_linux:
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,50 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.33.47](https://github.com/cube-js/cube/compare/v0.33.46...v0.33.47) (2023-08-15)


### Bug Fixes

* **cubestore:** Reduce memory usage while truncating ([#7031](https://github.com/cube-js/cube/issues/7031)) ([29080d7](https://github.com/cube-js/cube/commit/29080d72661bb23529d35343a7b1f4f20cda9ec6))


### Features

* **cubesql:** Support LIMIT for SQL push down ([1b5c19f](https://github.com/cube-js/cube/commit/1b5c19f03331ca4174b37614b8b41cdafc211ad7))





## [0.33.46](https://github.com/cube-js/cube/compare/v0.33.45...v0.33.46) (2023-08-14)


### Bug Fixes

* **cubestore:** Missing filter in the middle of an index prunes unnecessary partitions ([5690d8d](https://github.com/cube-js/cube/commit/5690d8da87e1d3959620ba43cd0b0648d3285d68))


### Features

* **cubesql:** Initial SQL push down support for BigQuery, Clickhouse and MySQL ([38467ab](https://github.com/cube-js/cube/commit/38467ab7de64803cd51acf4d5fc696938e52f778))





## [0.33.45](https://github.com/cube-js/cube/compare/v0.33.44...v0.33.45) (2023-08-13)


### Features

* **cubesql:** CASE WHEN SQL push down ([#7029](https://github.com/cube-js/cube/issues/7029)) ([80e4a60](https://github.com/cube-js/cube/commit/80e4a609cdb983db0a600d0fff0fd5bfe31652ed))
* **cubesql:** Whole SQL query push down to data sources ([#6629](https://github.com/cube-js/cube/issues/6629)) ([0e8a76a](https://github.com/cube-js/cube/commit/0e8a76a20cb37e675997f384785dd06e09175113))





## [0.33.44](https://github.com/cube-js/cube/compare/v0.33.43...v0.33.44) (2023-08-11)


Expand Down
83 changes: 46 additions & 37 deletions docs/docs-new/components/mdx/AlertBox/AlertBox.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import classes from './AlertBox.module.css';
import classnames from 'classnames/bind';
import React from "react";
import classes from "./AlertBox.module.css";
import classnames from "classnames/bind";
const cn = classnames.bind(classes);

export enum AlertBoxTypes {
DANGER = 'danger',
INFO = 'info',
SUCCESS = 'success',
WARNING = 'warning',
DANGER = "danger",
INFO = "info",
SUCCESS = "success",
WARNING = "warning",
}

declare const TypeToEmoji: {
Expand All @@ -19,55 +19,64 @@ declare const TypeToEmoji: {
type CalloutType = keyof typeof TypeToEmoji;

export type AlertBoxProps = {
children: string;
children: React.ReactNode;
heading?: string;
type: AlertBoxTypes;
}
};

const typeMapping: Record<AlertBoxTypes, CalloutType> = {
'danger': 'error',
info: 'info',
warning: 'warning',
success: 'default',
}
danger: "error",
info: "info",
warning: "warning",
success: "default",
};

const iconMapping: Record<string, any> = {
'danger': '🚫',
info: 'ℹ️',
warning: '⚠️',
success: '✅',
danger: "🚫",
info: "ℹ️",
warning: "⚠️",
success: "✅",
};

export const AlertBox = ({ children, heading, type }: AlertBoxProps) => {
const header = heading
? (
<div className={classes.AlertBox__header}>
<span className={cn('AlertBox__HeaderIcon')}>{iconMapping[type]}</span>
{heading}
</div>
)
: null;
const header = heading ? (
<div className={classes.AlertBox__header}>
<span className={cn("AlertBox__HeaderIcon")}>{iconMapping[type]}</span>
{heading}
</div>
) : null;

return (
<div className={cn('AlertBox__Wrapper', `AlertBox__Wrapper--${typeMapping[type]}`)}>
<div
className={cn(
"AlertBox__Wrapper",
`AlertBox__Wrapper--${typeMapping[type]}`
)}
>
{header}
<div className={classes.AlertBox__content}>
{children}
</div>
<div className={classes.AlertBox__content}>{children}</div>
</div>
)
}
);
};

export type AlertBoxSubclass = Omit<AlertBoxProps, 'type'>;
export type AlertBoxSubclass = Omit<AlertBoxProps, "type">;

export type DangerBoxProps = AlertBoxSubclass;
export const DangerBox = (props: DangerBoxProps) => <AlertBox type={AlertBoxTypes.DANGER} {...props} />;
export const DangerBox = (props: DangerBoxProps) => (
<AlertBox type={AlertBoxTypes.DANGER} {...props} />
);

export type InfoBoxProps = AlertBoxSubclass;
export const InfoBox = (props: InfoBoxProps) => <AlertBox type={AlertBoxTypes.INFO} {...props} />;
export const InfoBox = (props: InfoBoxProps) => (
<AlertBox type={AlertBoxTypes.INFO} {...props} />
);

export type SuccessBoxProps = AlertBoxSubclass;
export const SuccessBox = (props: SuccessBoxProps) => <AlertBox type={AlertBoxTypes.SUCCESS} {...props} />;
export const SuccessBox = (props: SuccessBoxProps) => (
<AlertBox type={AlertBoxTypes.SUCCESS} {...props} />
);

export type WarningBoxProps = AlertBoxSubclass;
export const WarningBox = (props: WarningBoxProps) => <AlertBox type={AlertBoxTypes.WARNING} {...props} />;
export const WarningBox = (props: WarningBoxProps) => (
<AlertBox type={AlertBoxTypes.WARNING} {...props} />
);
20 changes: 20 additions & 0 deletions docs/docs-new/components/mdx/Banners/CommunitySupportedDriver.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { WarningBox } from "@/components/mdx/AlertBox/AlertBox";
import { Link } from "@/components/overrides/Anchor/Link";

export interface CommunitySupportedDriverProps {
dataSource: string;
}

export const CommunitySupportedDriver = ({
dataSource,
}: CommunitySupportedDriverProps) => {
return (
<WarningBox>
The driver for {dataSource} is{" "}
<Link href="/product/configuration/data-sources#driver-support">
community-supported
</Link>{" "}
and is not supported by Cube or the vendor.
</WarningBox>
);
};
8 changes: 7 additions & 1 deletion docs/docs-new/components/mdx/Grid/GridItem.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
transition: all .2s ease;
cursor: pointer;
}
@media screen and (min-width: 992px) {
.GridItem__Wrapper {
height: 5.375rem;
}
}

.GridItem__Wrapper:hover {
background: #F6F6F8;
Expand All @@ -24,7 +29,9 @@
}

.GridItem__Image {
display: flex;
height: 2.5rem;
align-self: center;
}

.GridItem__Title {
Expand All @@ -36,5 +43,4 @@
line-height: 32px;
letter-spacing: 0.02em;
color: var(--dark);
text-align: center;
}
5 changes: 5 additions & 0 deletions docs/docs-new/components/mdx/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { Table } from '@/components/overrides/Table/Table';
import { Td } from '@/components/overrides/Table/Td';
import { Th } from '@/components/overrides/Table/Th';
import { Tr } from '@/components/overrides/Table/Tr';
import { CommunitySupportedDriver } from '@/components/mdx/Banners/CommunitySupportedDriver';
import { Code } from '../overrides/Code/Code';

export const components = {
...Buttons,
Expand Down Expand Up @@ -54,10 +56,13 @@ export const components = {
Diagram,
YouTubeVideo,

CommunitySupportedDriver,

// Overrides
h1: H1,
a: Link,
table: Table,
code: Code,
td: Td,
th: Th,
tr: Tr,
Expand Down
25 changes: 25 additions & 0 deletions docs/docs-new/components/overrides/Code/Code.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import cn from 'classnames'
import type { ComponentProps, ReactElement } from 'react'

export const Code = ({
children,
className,
...props
}: ComponentProps<'code'>): ReactElement => {
const hasLineNumbers = 'data-line-numbers' in props
return (
<code
className={cn(
'nx-border-black nx-border-opacity-[0.04] nx-bg-opacity-[0.03] nx-bg-black break-all nx-rounded-md nx-border nx-py-0.5 nx-px-[.25em] nx-text-[.9em]',
'dark:nx-border-white/10 dark:nx-bg-white/10 ',
hasLineNumbers && '[counter-reset:line]',
className
)}
// always show code blocks in ltr
dir="ltr"
{...props}
>
{children}
</code>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ const Chart = ({ query }) => {
## Refresh Rate

As in the case of a regular data fetch, real-time data fetch obeys
[`refresh_key` refresh rules](caching#refresh-keys). In order to provide a
desired refresh rate, `refresh_key` should reflect the rate of change of the
underlying data set; the querying time should also be much less than the desired
refresh rate. Please use the
[`refresh_key` refresh rules](/product/caching#refresh-keys). In order to
provide a desired refresh rate, `refresh_key` should reflect the rate of change
of the underlying data set; the querying time should also be much less than the
desired refresh rate. Please use the
[`every`](/product/data-modeling/reference/cube#refresh_key) parameter to adjust
the refresh interval.
8 changes: 8 additions & 0 deletions docs/docs-new/pages/product/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ mode does the following:
- Uses `memory` instead of `cubestore` as the default cache/queue engine
- Logs incorrect/invalid configuration for `externalRefresh` /`waitForRenew`
instead of throwing errors
- Allows access to non-public cubes and members through the [`/meta`
endpoint][ref-ref-meta] and for querying through the [REST][ref-rest-api],
[GraphQL][ref-gql-api] or [SQL][ref-sql-api] APIs.

[ref-ref-meta]: /reference/rest-api#v1meta
[ref-rest-api]: /product/apis-integrations/rest-api
[ref-gql-api]: /product/apis-integrations/graphql-api
[ref-sql-api]: /product/apis-integrations/sql-api

## Concurrency and pooling

Expand Down
22 changes: 21 additions & 1 deletion docs/docs-new/pages/product/configuration/data-sources.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ can also contribute a driver, see this
imageUrl="https://static.cube.dev/icons/trino.svg"
title="Trino"
/>
<GridItem
url="data-sources/duckdb"
imageUrl="https://static.cube.dev/icons/duckdb-light.svg"
title="DuckDB / MotherDuck"
/>
</Grid>

## Transactional Databases
Expand Down Expand Up @@ -135,7 +140,7 @@ can also contribute a driver, see this
/>
</Grid>

## NoSQL & Other Data Sources
## Other Data Sources

<Grid imageSize={[56, 56]}>
<GridItem
Expand All @@ -153,6 +158,21 @@ can also contribute a driver, see this
imageUrl="https://static.cube.dev/icons/druid.svg"
title="Druid"
/>
<GridItem
url="data-sources/duckdb"
imageUrl="https://static.cube.dev/icons/parquet.svg"
title="Parquet"
/>
<GridItem
url="data-sources/duckdb"
imageUrl="https://static.cube.dev/icons/csv.svg"
title="CSV"
/>
<GridItem
url="data-sources/duckdb"
imageUrl="https://static.cube.dev/icons/json.svg"
title="JSON"
/>
</Grid>

## Driver Support
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ module.exports = {
"clickhouse": "ClickHouse",
"databricks-jdbc": "Databricks (JDBC)",
"druid": "Druid",
"duckdb": "DuckDB / MotherDuck",
"elasticsearch": "Elasticsearch",
"firebolt": "Firebolt",
"google-bigquery": "Google BigQuery",
"hive": "Hive",
"hive": "Hive / SparkSQL",
"ksqldb": "ksqlDB",
"materialize": "Materialize",
"mongodb": "MongoDB",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ redirect_from:

# Druid

<WarningBox>
The driver for Druid is{" "}
<a href="../databases#driver-support">community-supported</a> and is not
supported by Cube or the vendor.
</WarningBox>
<CommunitySupportedDriver dataSource="Druid" />

## Prerequisites

Expand Down
Loading

0 comments on commit 1435ca2

Please sign in to comment.