Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/risingwavelabs/risingwave i…
Browse files Browse the repository at this point in the history
…nto li0k/storage_fix_strategy_for_append_only
  • Loading branch information
Li0k committed Jan 23, 2025
2 parents 35bc722 + a2cf60d commit 8967c87
Show file tree
Hide file tree
Showing 22 changed files with 354 additions and 177 deletions.
84 changes: 6 additions & 78 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 20 additions & 1 deletion dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"recharts": "^2.3.2",
"reflect-metadata": "^0.2.2",
"styled-components": "5.3.0",
"ts-proto": "^1.169.1"
"ts-proto": "^1.169.1",
"uuid":"^11.0.5"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.2",
Expand Down
4 changes: 2 additions & 2 deletions dashboard/pages/heap_profiling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import {
} from "@chakra-ui/react"
import Editor from "@monaco-editor/react"
import base64url from "base64url"
import { randomUUID } from "crypto"
import Head from "next/head"
import path from "path"
import { Fragment, useEffect, useState } from "react"
import { v4 as uuidv4 } from "uuid"
import SpinnerOverlay from "../components/SpinnerOverlay"
import Title from "../components/Title"
import api from "../lib/api/api"
Expand Down Expand Up @@ -161,7 +161,7 @@ export default function HeapProfiling() {
let objUrl = window.URL.createObjectURL(resObj.blob)
let link = document.createElement("a")
link.href = objUrl
link.download = resObj.filename || randomUUID()
link.download = resObj.filename || uuidv4()
link.click()
result = `${title}\n\nDownloaded!`
} catch (e: any) {
Expand Down
15 changes: 14 additions & 1 deletion e2e_test/batch/transaction/cursor.slt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ DECLARE
test_cursor CURSOR FOR
SELECT * FROM test where a > 2 ORDER BY a;

# Cursor with name `test_cursor` is already declared.
statement error
DECLARE
test_cursor CURSOR FOR
Expand Down Expand Up @@ -88,8 +89,20 @@ FETCH NEXT from test_cursor;
statement ok
COMMIT;

# Cursor is not schema-bound.
statement error sql parser error: expected CURSOR, found: \.
DECLARE
test_schema.test_cursor CURSOR FOR
SELECT * FROM test where a > 2 ORDER BY a;

# Cannot use reserved keyword as cursor name.
statement error sql parser error: syntax error at or near all
DECLARE
all CURSOR FOR
SELECT * FROM test where a > 2 ORDER BY a;

statement ok
drop table test;

statement ok
drop table a;
drop table a;
25 changes: 24 additions & 1 deletion e2e_test/subscription/check_sql_statement.slt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ insert into t1 values (1,2), (2,3);
statement ok
create subscription sub from t1 with(retention = '1D');

statement ok
create schema s1;

statement ok
create subscription s1.sub1 from t1 with(retention = '1D');

statement ok
declare cur subscription cursor for sub;

Expand All @@ -28,6 +34,14 @@ declare cur5 subscription cursor for sub since asd;
statement error
declare cur6 subscription cursor for sub since 18446744073709551615;

# We should correctly parse the schema for the subscription.
statement ok
declare cur7 subscription cursor for s1.sub1;

# However, cursor itself is not schema-bound.
statement error
declare s1.cur8 subscription cursor for s1.sub1;

statement error
declare cur subscription cursor for sub;

Expand All @@ -43,8 +57,17 @@ close cur2;
statement ok
close cur3;

statement ok
close cur7;

statement ok
drop subscription s1.sub1;

statement ok
drop schema s1;

statement ok
drop subscription sub;

statement ok
drop table t1;
drop table t1;
19 changes: 11 additions & 8 deletions src/batch/executors/src/executor/join/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,6 @@ impl<K: HashKey> HashJoinExecutor<K> {
.enumerate()
.filter_by_bitmap(probe_chunk.visibility())
{
non_equi_state.found_matched = false;
if let Some(first_matched_build_row_id) = hash_map.get(probe_key) {
non_equi_state
.first_output_row_id
Expand Down Expand Up @@ -2030,13 +2029,17 @@ impl DataChunkMutator {
break;
}
}
if ANTI_JOIN && !has_more_output_rows && !*found_matched {
new_visibility.set(start_row_id, true);
if !has_more_output_rows && ANTI_JOIN {
if !*found_matched {
new_visibility.set(start_row_id, true);
}
*found_matched = false;
}

first_output_row_ids.clear();

self.0.set_visibility(new_visibility.finish());
self.0
.set_visibility(new_visibility.finish() & self.0.visibility());
self
}

Expand All @@ -2058,7 +2061,8 @@ impl DataChunkMutator {

build_row_ids.clear();

self.0.set_visibility(new_visibility.finish());
self.0
.set_visibility(new_visibility.finish() & self.0.visibility());
self
}

Expand Down Expand Up @@ -2135,7 +2139,8 @@ impl DataChunkMutator {

build_row_ids.clear();

self.0.set_visibility(new_visibility.finish());
self.0
.set_visibility(new_visibility.finish() & self.0.visibility());
self
}

Expand Down Expand Up @@ -3458,7 +3463,6 @@ mod tests {
&expect
));
assert_eq!(state.first_output_row_id, Vec::<usize>::new());
assert!(state.found_matched);
}

#[tokio::test]
Expand Down Expand Up @@ -3558,7 +3562,6 @@ mod tests {
&expect
));
assert_eq!(state.first_output_row_id, Vec::<usize>::new());
assert!(state.found_matched);
}

#[tokio::test]
Expand Down
Loading

0 comments on commit 8967c87

Please sign in to comment.