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

Conversation

@DongLiang-0
Copy link
Contributor

No description provided.

@DongLiang-0 DongLiang-0 requested a review from a team as a code owner July 1, 2025 03:29
typeName := col.Type.String()
// hasPrefix, not equal, because we can have DateTime64(3) and we want to catch it
if strings.HasPrefix(typeName, "DateTime64") {
if strings.HasPrefix(typeName, "datetime") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if strings.HasPrefix(typeName, "datetime") {
if strings.HasPrefix(typeName, "Datetime64") || strings.HasPrefix(typeName, "datetime") {

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's try this way

return DateTime64
}
if strings.HasPrefix(typeName, "DateTime") {
if strings.HasPrefix(typeName, "date") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if strings.HasPrefix(typeName, "date") {
if strings.HasPrefix(typeName, "DateTime") || strings.HasPrefix(typeName, "date") {

func ResolveType(clickHouseTypeName string) reflect.Type {
switch clickHouseTypeName {
case "String", "LowCardinality(String)", "UUID", "FixedString":
func ResolveType(dorisTypeName string) reflect.Type {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we have to have type resolver per each backend. It would make sense to introduce

type TypeResolver interface {
  ResolveType(typeName string) reflect.Type
}

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.

2 participants