Skip to content

Commit

Permalink
chore: fix typo (arana-db#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjeffcaii authored Jan 6, 2022
1 parent cbfb4cc commit 3a43d68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/proto/rule/database_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (dt DatabaseTables) And(other DatabaseTables) DatabaseTables {
fuzz := tbls["*"]
delete(tbls, "*")

// 子库全匹配
// fuzz match all sub databases
if fuzz&flagA != 0 && fuzz&flagB != 0 {
ret[db] = append(ret[db], "*")
continue
Expand Down
8 changes: 4 additions & 4 deletions pkg/runtime/function/function_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ func TestEval(t *testing.T) {

func TestCastUnsigned(t *testing.T) {
first := map[string]interface{}{
"foo": 10,
"bar": 1000055,
"foo": 10,
"bar": 1000055,
"foobar": 1,
}
v, err := EvalString("$CAST_UNSIGNED(($IF(parseInt(arguments[0].TDDLX_e120910b) == 0 ? null : parseFloat(arguments[0].foo) / parseFloat(arguments[0].bar)>10002, 3.1415, 2.1718)))", first)
v, err := EvalString("$CAST_UNSIGNED(($IF(parseInt(arguments[0].foobar) == 0 ? null : parseFloat(arguments[0].foo) / parseFloat(arguments[0].bar)>10002, 3.1415, 2.1718)))", first)
assert.NoError(t, err)
t.Log("v:", v)

}

func TestEvalString(t *testing.T) {
Expand Down

0 comments on commit 3a43d68

Please sign in to comment.