Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Conversation

@jakozaur
Copy link
Contributor

@jakozaur jakozaur commented Jun 5, 2025

This is stage 2 of removing the parse create table. Not completely, and still no logic to just rely on schema, but it updates all tests as well as vastly reduces the scope of the create table parser.

As a side-effect, it bugfixes tables with dots in the names.

@jakozaur jakozaur requested a review from a team as a code owner June 5, 2025 11:20
)
if err != nil {
return nil, err
table := clickhouse.Table{
Copy link
Member

Choose a reason for hiding this comment

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

I still like the idea of having this behind constructor, esp. given that this repeats in few places.

Of course I'd make clickhouse.NewTable() take table name and list of columns not the CREATE TABLE ... string 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Totally agree, but likely in next PR.

ClusterName string `default:""`
Cols map[string]*Column
Config *ChTableConfig
Indexes []IndexStatement
Copy link
Member

Choose a reason for hiding this comment

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

Sooo good to see this go!

Copy link
Member

@mieciu mieciu left a comment

Choose a reason for hiding this comment

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

A very much needed refactor, great job!

I'd still prefer to have clickhouse.Table object not being initialized directly, but not going to push back because of that.

Copy link
Member

@nablaone nablaone left a comment

Choose a reason for hiding this comment

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

LGTM

@jakozaur
Copy link
Contributor Author

jakozaur commented Jun 5, 2025

A very much needed refactor, great job!

I'd still prefer to have clickhouse.Table object not being initialized directly, but not going to push back because of that.

I will, though I’ll probably merge it as-is. I’ve already significantly expanded the scope of my work just to fix a tiny bug. But instead of adding more duct tape (fix table names with dots), I chose a major simplification approach (don't rely on parsing of create tables).

@jakozaur
Copy link
Contributor Author

jakozaur commented Jun 5, 2025

/run-it

@jakozaur
Copy link
Contributor Author

jakozaur commented Jun 5, 2025

/run-it

1 similar comment
@jakozaur
Copy link
Contributor Author

jakozaur commented Jun 5, 2025

/run-it

@jakozaur
Copy link
Contributor Author

jakozaur commented Jun 5, 2025

/run-it

1 similar comment
@jakozaur
Copy link
Contributor Author

jakozaur commented Jun 5, 2025

/run-it

@jakozaur jakozaur added this pull request to the merge queue Jun 5, 2025
Merged via the queue into main with commit 57e07b7 Jun 5, 2025
11 of 12 checks passed
@jakozaur jakozaur deleted the jacek-remove-most-of-parse-create-table branch June 5, 2025 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants