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

ProfileInfo not availble when using Batch.Send() #1333

Open
9 tasks
iyuroch opened this issue Jun 25, 2024 · 1 comment
Open
9 tasks

ProfileInfo not availble when using Batch.Send() #1333

iyuroch opened this issue Jun 25, 2024 · 1 comment

Comments

@iyuroch
Copy link
Contributor

iyuroch commented Jun 25, 2024

Observed

  1. When providing context with profile info callback function to batch after Send() profileinfo not available
  2. Doing the same for select query result in profileinfo

Expected behaviour

Profile info available

Code example

clickhouse.Context(ctx, clickhouse.WithProgress(func(p *clickhouse.Progress) {
		fmt.Println("progress: ", p)
	}), clickhouse.WithProfileInfo(func(p *clickhouse.ProfileInfo) {
		fmt.Println("profile info: ", p)
	}), clickhouse.WithLogs(func(log *clickhouse.Log) {
		fmt.Println("log info: ", log)
	}))

	insert := fmt.Sprintf("INSERT INTO %s (%s)", tableName, strings.Join(cols, ", "))
	chBatch, _ := conn.PrepareBatch(ctx, insert)
	chBatch.Send()

Details

Environment

@iyuroch
Copy link
Contributor Author

iyuroch commented Jun 25, 2024

I can see that in the code we are going to end of the stream from the server, is there any other way how I can get profile info for batch.Send()? One way I can think of is passing query_id as an option and then checking in query log

@jkaflik jkaflik self-assigned this Jul 1, 2024
@jkaflik jkaflik removed their assignment Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants