Skip to content

Commit

Permalink
chore: fix typos & add typo checker to ci (#4767)
Browse files Browse the repository at this point in the history
* chore: fix typos

* add typo checker ci

* fmt

* add a typo to check ci

* fix: not a typo

* fix typo

* rerun ci
  • Loading branch information
xxchan authored Aug 20, 2022
1 parent bce7c81 commit 0019e59
Show file tree
Hide file tree
Showing 88 changed files with 208 additions and 183 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/typo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Typo checker
on: [pull_request]

jobs:
run:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v2

- name: Check spelling of the entire repository
uses: crate-ci/[email protected]
9 changes: 9 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[default.extend-words]
indexs = "indices"
Stichting = "Stichting"
fo = "fo"
FPR = "FPR"
ot = "ot"

[files]
extend-exclude = ["src/tests/regress/data", "e2e_test", "**/*.svg", "scripts"]
10 changes: 5 additions & 5 deletions dashboard/components/StreamingView.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default function StreamingView(props) {


const canvasRef = useRef(null);
const canvasOutterBox = useRef(null);
const canvasOuterBox = useRef(null);
const engineRef = useRef(null);
const viewRef = useRef(null);

Expand Down Expand Up @@ -201,8 +201,8 @@ export default function StreamingView(props) {
}

const resizeCanvas = () => {
if (canvasOutterBox.current) {
getEngine() && getEngine().resize(canvasOutterBox.current.clientWidth, canvasOutterBox.current.clientHeight);
if (canvasOuterBox.current) {
getEngine() && getEngine().resize(canvasOuterBox.current.clientWidth, canvasOuterBox.current.clientHeight);
}
}

Expand Down Expand Up @@ -260,7 +260,7 @@ export default function StreamingView(props) {
<SvgBoxCover style={{ right: "10px", top: "10px", width: "500px" }}>
<PopupBox style={{
display: showInfoPane ? "block" : "none",
height: canvasOutterBox && canvasOutterBox.current ? canvasOutterBox.current.clientHeight - 100 : 500
height: canvasOuterBox && canvasOuterBox.current ? canvasOuterBox.current.clientHeight - 100 : 500
}}>
<PopupBoxHeader>
<IconButton onClick={() => setShowInfoPane(false)}>
Expand Down Expand Up @@ -426,7 +426,7 @@ export default function StreamingView(props) {


</SvgBoxCover>
<div ref={canvasOutterBox} style={{ zIndex: 5, width: "100%", height: "100%", overflow: "auto" }} className="noselect">
<div ref={canvasOuterBox} style={{ zIndex: 5, width: "100%", height: "100%", overflow: "auto" }} className="noselect">
<canvas ref={canvasRef} id="c" width={1000} height={1000} style={{ cursor: "pointer" }} />
</div>
</SvgBox >
Expand Down
4 changes: 2 additions & 2 deletions dashboard/lib/algo.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { newMatrix } from "./util";
/**
* Traverse a tree from its root node, and do operation
* by calling the step function.
* Every node will be visted only once.
* Every node will be visited only once.
* @param {{nextNodes: []}} root The root node of the tree
* @param {(node: any) => boolean} step callback when a node is visited.
* return true if you want to stop to traverse its next nodes.
Expand All @@ -41,7 +41,7 @@ export function treeBfs(root, step) {
/**
* Traverse a graph from a random node, and do
* operation by calling the step function.
* Every node will be visted only once.
* Every node will be visited only once.
* @param {{nextNodes: []}} root A random node in the graph
* @param {(node: any) => boolean} step callback when a node is visited.
* @param {string} [neighborListKey="nextNodes"]
Expand Down
4 changes: 2 additions & 2 deletions dashboard/lib/graaphEngine/canvasEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export class CanvasEngine {
}

/**
* Invoke the click hander of an object.
* Invoke the click handler of an object.
* @param {fabric.Object} target
*/
async _handleClickEvent(target) {
Expand Down Expand Up @@ -562,7 +562,7 @@ export class CanvasEngine {
* is changed, such that the canvas can fix the current
* size of the browser.
*
* Note that the outter div box of the canvas will be set
* Note that the outer div box of the canvas will be set
* according to the parameters. However, the width and
* height of the canvas is double times of the parameters.
* This is the feature of fabric.js to keep the canvas
Expand Down
6 changes: 3 additions & 3 deletions dashboard/lib/graaphEngine/svgEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class Path extends DrawElement {
}
}

const orginalZoom = new d3.ZoomTransform(0.5, 0, 0);
const originalZoom = new d3.ZoomTransform(0.5, 0, 0);

export class SvgEngine {
/**
Expand All @@ -171,7 +171,7 @@ export class SvgEngine {
});

this.svg.call(this.zoom)
.call(this.zoom.transform, orginalZoom)
.call(this.zoom.transform, originalZoom)
this.svg.on("pointermove", event => {
this.transform.invert(d3.pointer(event))
});
Expand All @@ -191,7 +191,7 @@ export class SvgEngine {
}

resetCamera() {
this.svg.call(this.zoom.transform, orginalZoom);
this.svg.call(this.zoom.transform, originalZoom);
}

cleanGraph() {
Expand Down
4 changes: 2 additions & 2 deletions dashboard/lib/streamPlan/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ export default class StreamPlanParser {
/**
* Randomly select a actor to represent its
* fragment, and append a property named `representedActorList`
* to store all the other actors in the same fragement.
* to store all the other actors in the same fragment.
*
* Actors are degree of parallelism of a fragment, such that one of
* the actor in a fragement can represent all the other actor in
* the actor in a fragment can represent all the other actor in
* the same fragment.
*
* @returns A Set containing actors representing its fragment.
Expand Down
16 changes: 8 additions & 8 deletions dashboard/lib/streamPlan/streamChartHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function computeNodeAddrToSideColor(addr) {
* layoutActorBox <- dagLayout <- drawActorBox <- drawFlow
* [ The layout of the ] [ The layout of ] [ Draw an actor ] [ Draw many actors ]
* [ operators in an ] [ actors in a ] [ in specified ] [ and links between ]
* [ actor. ] [ stram plan ] [ place ] [ them. ]
* [ actor. ] [ stream plan ] [ place ] [ them. ]
*
*/
export class StreamChartHelper {
Expand All @@ -128,7 +128,7 @@ export class StreamChartHelper {
*
* @param {Group} g The group element in canvas engine
* @param {*} data The raw response from the meta node
* @param {(e, node) => void} onNodeClick The callback function trigged when a node is click
* @param {(e, node) => void} onNodeClick The callback function triggered when a node is click
* @param {(e, actor) => void} onActorClick
* @param {{type: string, node: {host: {host: string, port: number}}, id?: number}} selectedWokerNode
* @param {Array<number>} shownActorIdList
Expand Down Expand Up @@ -468,10 +468,10 @@ export class StreamChartHelper {
* }} props
* @param {Group} props.g The group element in canvas engine
* @param {{id: any, nextNodes: []}} props.rootNode The root node of the tree in the actor
* @param {string} props.nodeColor [optinal] The filled color of nodes.
* @param {string} props.strokeColor [optinal] The color of the stroke.
* @param {number} props.baseX [optinal] The x coordination of the lef-top corner. default: 0
* @param {number} props.baseY [optinal] The y coordination of the lef-top corner. default: 0
* @param {string} props.nodeColor [optional] The filled color of nodes.
* @param {string} props.strokeColor [optional] The color of the stroke.
* @param {number} props.baseX [optional] The x coordination of the lef-top corner. default: 0
* @param {number} props.baseY [optional] The y coordination of the lef-top corner. default: 0
* @returns {Group} The group element of this tree
*/
drawActorBox(props) {
Expand Down Expand Up @@ -576,7 +576,7 @@ export class StreamChartHelper {
// .attr("d", linkGen(link))
.attr("fill", "none")
.attr("class", "actor-" + actor.actorId)
.classed("interal-link", true)
.classed("internal-link", true)
.attr("id", constructInternalLinkId(link.sourceNode, link.nextNode))
.style("stroke-width", internalLinkStrokeWidth)
.attr("stroke", linkColor);
Expand Down Expand Up @@ -614,7 +614,7 @@ export class StreamChartHelper {
* baseY?: number
* }} props
* @param {Group} props.g The target group contains this group.
* @param {Arrary} props.actorDagList A list of dag nodes constructed from actors
* @param {Array} props.actorDagList A list of dag nodes constructed from actors
* { id: actor.actorId, nextNodes: [], actor: actor }
* @param {number} props.baseX [optional] The x coordination of left-top corner. default: 0.
* @param {number} props.baseY [optional] The y coordination of left-top corner. default: 0.
Expand Down
2 changes: 1 addition & 1 deletion dashboard/test/algo.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Node } from "../lib/algo";
import { StreamChartHelper } from "../lib/streamPlan/streamChartHelper";

describe("Algo", () => {
it("shoule generate right dag layout", () => {
it("should generate right dag layout", () => {
// fake data
let nodes = [];
for (let i = 0; i < 10; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion docker/risingwave-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/data-model-and-encoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RisingWave stores user data in shared key-value storage called 'Hummock'. Tables

![row-format](./images/data-model-and-encoding/row-format.svg)

Considering that ordering matters in some cases, e.g. result set of an order-by query, fields of keys must preserve the order of original values after being encoded into bytes. This is what `memcomparable` is used for. For example, integers must be encoded in big-endien and the sign bit must be flipped to preserve order. In contrast, the encoding of values does not need to preserve order.
Considering that ordering matters in some cases, e.g. result set of an order-by query, fields of keys must preserve the order of original values after being encoded into bytes. This is what `memcomparable` is used for. For example, integers must be encoded in big-endian and the sign bit must be flipped to preserve order. In contrast, the encoding of values does not need to preserve order.



Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For example, an executor performs `insert(a, b, c)` and `delete(d, e, f)` throug

![write example](../images/relational-table-layer/relational-table-03.svg)
### Read Path
Executors should be able to read the just written data, which means uncommited data is visible. The data in Mem Table (memory) is fresher than that in shared storage (state store). State Table provides both point-get and scan to read from state store by merging data from Mem Table and Storage Table.
Executors should be able to read the just written data, which means uncommitted data is visible. The data in Mem Table (memory) is fresher than that in shared storage (state store). State Table provides both point-get and scan to read from state store by merging data from Mem Table and Storage Table.
#### Get
For example, let's assume that the first column is the pk of relational table, and the following operations are performed.
```
Expand Down
4 changes: 2 additions & 2 deletions e2e_test/batch/join/inner/test_join.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ SELECT a, test.b, c FROM test INNER JOIN test2 ON test2.b = test.b ORDER BY c;
11 1 20
12 2 30

# explicit join with additional condition that is no left-right comparision
# explicit join with additional condition that is no left-right comparison
query III
SELECT a, test.b, c FROM test INNER JOIN test2 ON test2.b = test.b and test.b = 2;
----
Expand All @@ -75,7 +75,7 @@ SELECT a, test.b, c FROM test INNER JOIN test2 ON test2.b = test.b and 2 = 2 ORD
11 1 20
12 2 30

# explicit join with only condition that is no left-right comparision
# explicit join with only condition that is no left-right comparison
query III
SELECT a, test.b, c FROM test INNER JOIN test2 ON test.b = 2 ORDER BY c;
----
Expand Down
2 changes: 1 addition & 1 deletion e2e_test/batch/order/test_limit.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ INSERT INTO integers VALUES (1), (2), (3), (4), (5);
# 4
# 5

# Subqueries that return zero rows = Same as ommiting limit clause
# Subqueries that return zero rows = Same as omitting limit clause
# query I
# SELECT * FROM integers as int order by 1 LIMIT (SELECT max(integers.i) FROM integers where i > 5);
# ----
Expand Down
2 changes: 1 addition & 1 deletion e2e_test/batch/types/struct/struct_operation.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ CREATE TABLE b(id INTEGER, j VARCHAR);
statement ok
INSERT INTO b VALUES (1, 'hello');

# unequality join
# inequality join
query IIII
SELECT * FROM a LEFT JOIN b ON a.id<>b.id
----
Expand Down
2 changes: 1 addition & 1 deletion grafana/risingwave-dashboard.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions grafana/risingwave-dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def section_streaming_actors(outer_panels):
]),
panels.timeseries_percentage("Actor Input Blocking Time Ratio", [
panels.target(
"rate(stream_actor_input_buffer_blocking_duration_ns[$__rate_interval]) / 1000000000", "{{actor_id}}->{{upsteam_fragment_id}}"
"rate(stream_actor_input_buffer_blocking_duration_ns[$__rate_interval]) / 1000000000", "{{actor_id}}->{{upstream_fragment_id}}"
),
]),
panels.timeseries_actor_latency("Actor Barrier Latency", [
Expand Down Expand Up @@ -1248,7 +1248,7 @@ def section_grpc_hummock_meta_client(outer_panels):
"sum(irate(state_store_get_new_sst_ids_latency_counts[$__rate_interval]))by(job,instance)", "get_new_sst_ids_latency_counts - {{instance}} "
),
]),
panels.timeseries_latency("compation_latency", [
panels.timeseries_latency("compaction_latency", [
panels.target(
"histogram_quantile(0.5, sum(irate(state_store_report_compaction_task_latency_bucket[$__rate_interval])) by (le, job, instance))", "report_compaction_task_latency_p50 - {{instance}}"
),
Expand Down
2 changes: 1 addition & 1 deletion proto/hummock.proto
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ message CompactionConfig {
uint64 max_bytes_for_level_multiplier = 3;
uint64 max_compaction_bytes = 4;
uint64 sub_level_max_compaction_bytes = 5;
uint64 level0_tigger_file_numer = 6;
uint64 level0_trigger_file_number = 6;
uint64 level0_tier_compact_file_number = 7;
CompactionMode compaction_mode = 8;
repeated string compression_algorithm = 9;
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/executor/join/lookup_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl<C: BatchTaskContext> ProbeSideSource<C> {
/// Creates the `ProstExchangeSource` using the given `id`.
fn build_prost_exchange_source(&self, id: &ParallelUnitId) -> Result<ProstExchangeSource> {
let worker = self.pu_to_worker_mapping.get(id).ok_or_else(|| {
internal_error("No worker node found for hte given parallel unit id.")
internal_error("No worker node found for the given parallel unit id.")
})?;

let local_execute_plan = LocalExecutePlan {
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/executor/row_seq_scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl BoxedExecutorBuilder for RowSeqScanExecutorBuilder {
vnodes: Bitmap::from(vnodes).into(),
dist_key_indices,
},
// This is possbile for dml. vnode_bitmap is not filled by scheduler.
// This is possible for dml. vnode_bitmap is not filled by scheduler.
// Or it's single distribution, e.g., distinct agg. We scan in a single executor.
None => Distribution::all_vnodes(dist_key_indices),
};
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/executor/sort_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ mod tests {
}

#[tokio::test]
async fn execute_sum_int32_grouped_execeed_limit() -> Result<()> {
async fn execute_sum_int32_grouped_exceed_limit() -> Result<()> {
// mock a child executor
let schema = Schema {
fields: vec![
Expand Down
2 changes: 1 addition & 1 deletion src/batch/src/task/task_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl<C: BatchTaskContext> BatchTaskExecution<C> {
/// to a particular shuffling strategy. For example, in hash shuffling, the result will be
/// hash partitioned across multiple channels.
/// To obtain the result, one must pick one of the channels to consume via [`TaskOutputId`]. As
/// such, parallel consumers are able to consume the result idependently.
/// such, parallel consumers are able to consume the result independently.
pub async fn async_execute(self: Arc<Self>) -> Result<()> {
trace!(
"Prepare executing plan [{:?}]: {}",
Expand Down
Loading

0 comments on commit 0019e59

Please sign in to comment.