Skip to content

Commit 7248b7d

Browse files
authored
chore(tesseract): Some fixes to pass integration tests (#9244)
1 parent 08650e2 commit 7248b7d

Some content is hidden

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

47 files changed

+797
-241
lines changed

packages/cubejs-backend-native/Cargo.lock

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cubejs-schema-compiler/src/adapter/BaseQuery.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3499,6 +3499,7 @@ export class BaseQuery {
34993499
in: '{{ column }} IN ({{ values_concat }}){{ is_null_check }}',
35003500
not_in: '{{ column }} NOT IN ({{ values_concat }}){{ is_null_check }}',
35013501
time_range_filter: '{{ column }} >= {{ from_timestamp }} AND {{ column }} <= {{ to_timestamp }}',
3502+
time_not_in_range_filter: '{{ column }} < {{ from_timestamp }} OR {{ column }} > {{ to_timestamp }}',
35023503
gt: '{{ column }} > {{ param }}',
35033504
gte: '{{ column }} >= {{ param }}',
35043505
lt: '{{ column }} < {{ param }}',

packages/cubejs-schema-compiler/test/integration/postgres/cube-views.test.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { getEnv } from '@cubejs-backend/shared';
12
import { BaseQuery, PostgresQuery } from '../../../src/adapter';
23
import { prepareCompiler } from '../../unit/PrepareCompiler';
34
import { dbRunner } from './PostgresDBRunner';
@@ -12,9 +13,9 @@ cube(\`Orders\`, {
1213
UNION ALL
1314
SELECT 2 as id, 2 as product_id, 'completed' as status, '2022-01-02T00:00:00.000Z'::timestamptz as created_at
1415
\`,
15-
16+
1617
shown: false,
17-
18+
1819
refreshKey: {
1920
sql: \`SELECT MAX(created_at) FROM \${Orders.sql()} orders WHERE \${FILTER_PARAMS.Orders.createdAt.filter('created_at')}\`
2021
},
@@ -47,7 +48,7 @@ cube(\`Orders\`, {
4748
type: \`count\`,
4849
//drillMembers: [id, createdAt]
4950
},
50-
51+
5152
runningTotal: {
5253
type: \`count\`,
5354
rollingWindow: {
@@ -67,28 +68,28 @@ cube(\`Orders\`, {
6768
sql: \`status\`,
6869
type: \`string\`
6970
},
70-
71+
7172
statusProduct: {
7273
sql: \`\${CUBE}.status || '_' || \${Products.name}\`,
7374
type: \`string\`
7475
},
75-
76+
7677
createdAt: {
7778
sql: \`created_at\`,
7879
type: \`time\`
7980
},
80-
81+
8182
productId: {
8283
sql: \`product_id\`,
8384
type: \`number\`,
8485
},
85-
86+
8687
productAndCategory: {
8788
sql: \`\${Products.name} || '_' || \${Products.ProductCategories.name}\`,
8889
type: \`string\`
8990
},
9091
},
91-
92+
9293
segments: {
9394
potatoOnly: {
9495
sql: \`\${CUBE}.product_id = 2 AND \${FILTER_PARAMS.Orders.productId.filter(\`\${CUBE.productId}\`)}\`,
@@ -104,7 +105,7 @@ cube(\`Products\`, {
104105
UNION ALL
105106
SELECT 2 as id, 1 as product_category_id, 'Potato' as name
106107
\`,
107-
108+
108109
joins: {
109110
ProductCategories: {
110111
sql: \`\${CUBE}.product_category_id = \${ProductCategories}.id\`,
@@ -129,7 +130,7 @@ cube(\`Products\`, {
129130
sql: \`name\`,
130131
type: \`string\`
131132
},
132-
133+
133134
proxyName: {
134135
sql: \`\${name}\`,
135136
type: \`string\`,
@@ -201,7 +202,7 @@ cube(\`ProductCategories\`, {
201202
view(\`OrdersView\`, {
202203
includes: [Orders],
203204
excludes: [Orders.createdAt],
204-
205+
205206
measures: {
206207
productCategoryCount: {
207208
sql: \`\${Orders.ProductsAlt.ProductCategories.count}\`,
@@ -224,7 +225,7 @@ view(\`OrdersView\`, {
224225
sql: \`\${Orders.ProductsAlt.ProductCategories.name}\`,
225226
type: \`string\`
226227
},
227-
228+
228229
productCategory: {
229230
sql: \`\${Orders.ProductsAlt.name} || '_' || \${Orders.ProductsAlt.ProductCategories.name} || '_' || \${categoryName}\`,
230231
type: \`string\`

0 commit comments

Comments
 (0)