Skip to content

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

Open
@iyuroch

Description

@iyuroch

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

  • clickhouse-go version: github.com/ClickHouse/clickhouse-go/v2 v2.23.0
  • Interface: ClickHouse API compatible driver
  • Go version:
  • Operating system:
  • ClickHouse version:
  • Is it a ClickHouse Cloud?
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved: (not related)
  • Sample data for all these tables, use [clickhouse-obfuscator] (not related)(https://github.com/ClickHouse/ClickHouse/blob/master/programs/obfuscator/Obfuscator.cpp#L42-L80) if necessary

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions