Skip to content

Commit

Permalink
fix silly bug: correctly remove wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
yokofly committed Oct 24, 2024
1 parent d09aae5 commit 2294238
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/dbio/database/database_proton.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,14 @@ func (conn *ProtonConn) processBatch(tableFName string, table Table, batch *iop.

for i, col := range batch.Columns {
dbType := strings.ToLower(col.DbType)
dbType = strings.TrimPrefix(dbType, "low_cardinality(")
dbType = strings.TrimPrefix(dbType, "nullable(")

dbType = strings.TrimSuffix(dbType, ")")
if strings.HasPrefix(dbType, "nullable(") {
dbType = strings.TrimPrefix(dbType, "nullable(")
dbType = strings.TrimSuffix(dbType, ")")
}
if strings.HasPrefix(dbType, "low_cardinality(") {
dbType = strings.TrimPrefix(dbType, "low_cardinality(")
dbType = strings.TrimSuffix(dbType, ")")
}

switch dbType {
case "int8":
Expand Down

0 comments on commit 2294238

Please sign in to comment.