zhsu

Results 8 comments of zhsu

Please check other merged PRs for reference on proper submission standards: https://github.com/secretflow/spu/pull/1104 https://github.com/secretflow/spu/pull/1102

> 测试函数 > > ```go > package server > > import ( > "testing" > > "github.com/stretchr/testify/assert" > ) > > func TestIsExplainQuery(t *testing.T) { > tests := []struct {...

提交的测试请确认能过实际通过,最好提供截图。 目前的测试无法跑通。 ![Uploading image.png…]()

> 6.DDL/DCL的多个类型继承baseExecutor实现多态,实现核心在Next函数中: 以simple的Next函数举例 > > // Next implements the Executor Next interface. > func (e *SimpleExec) Next(ctx context.Context, req *chunk.Chunk) (err error) { > if e.done { > return nil...

> 7.尝试在run函数里调用 Interpreter Compile,判断是否为explain-构造编译计划请求-构造编译计划,返回编译计划里的dot格式图,跳过后续流程 > > if _, ok := ast.(*ast.ExplainStmt); ok { > compiledReq := &pb.CompileQueryRequest{ > Query: stmt, > } > > intrpr := interpreter.NewInterpreter() > compiledPlan, err...

> func Run(ctx sessionctx.Context, stmt string, is infoschema.InfoSchema) 缺少参数是指? buildCompileRequest 应该只需要 session 和 context。 二者在 submitAndGet 里都提供了。 为 runSQL 函数加上 session 参数,或者直接增加一个 runExplain 函数,在 submitAndGet 里调用都可以。