Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add interactive-mode SQLExecutor with SQLRTTask #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yyMoming
Copy link

@yyMoming yyMoming commented Nov 7, 2023

No description provided.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


wenyu.ywm seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Collaborator

@fetchadd fetchadd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 先从aliyun:master同步一下代码,做一次本地合并
  2. 要修改的问题,cr中有标明

}

func (t *TaskConfig) AddProperty(key, value string) {
t.Config = append(t.Config, common.Property{Name: key, Value: value})
}

type BaseTask struct {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

暂时只有SQLRTTTask用了BaseTask, 先不单独提取一个“父类”。及时提取的话,要对外不可见

}

// UpdateInfo set information to running instance
func (instance *Instance) UpdateInfo(taskName, infoKey, infoValue string) (UpdateInfoResult, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和java sdk保持一致,用SetTaskInfo作为方法名

}

// UpdateInfo set information to running instance
func (instance *Instance) UpdateInfo(taskName, infoKey, infoValue string) (UpdateInfoResult, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UpdateInfoResult等返回值统一放到instance_res.go里

return nil
},
)
//
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码中很多这种无用的注释: "//", 都去掉

)

const (
DEFAULT_TASK_NAME = "sqlrt_task"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go中的常量用“驼峰式”命名,首字符大写

if err != nil {
return nil, errors.WithStack(err)
}
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方为什么在cfg.QueryId != -1时去掉 session.newInitionRequst等逻辑

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是需要调用: AttachToExistedIRDownloadSession

aliAccount := account.NewAliyunAccount(conf.AccessId, conf.AccessKey)
odpsIns := odps.NewOdps(aliAccount, conf.Endpoint)
odpsIns.SetDefaultProjectName(conf.ProjectName)
sql := `select * from all_types_demo_no_parition;`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

例子中的表名用:all_types_demo,需要其他表的话表名DDL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants