Skip to content

Commit

Permalink
Array and Map not wrapped in Nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
hutengfei committed Mar 26, 2024
1 parent 71d8e01 commit 03b7613
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object SchemaUtils {
}

private[clickhouse] def maybeNullable(chType: String, nullable: Boolean): String =
if (nullable) wrapNullable(chType) else chType
if (nullable && !chType.startsWith("Array") && !chType.startsWith("Map")) wrapNullable(chType) else chType

private[clickhouse] def wrapNullable(chType: String): String = s"Nullable($chType)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object SchemaUtils {
}

private[clickhouse] def maybeNullable(chType: String, nullable: Boolean): String =
if (nullable) wrapNullable(chType) else chType
if (nullable && !chType.startsWith("Array") && !chType.startsWith("Map")) wrapNullable(chType) else chType

private[clickhouse] def wrapNullable(chType: String): String = s"Nullable($chType)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object SchemaUtils {
}

private[clickhouse] def maybeNullable(chType: String, nullable: Boolean): String =
if (nullable) wrapNullable(chType) else chType
if (nullable && !chType.startsWith("Array") && !chType.startsWith("Map")) wrapNullable(chType) else chType

private[clickhouse] def wrapNullable(chType: String): String = s"Nullable($chType)"
}

0 comments on commit 03b7613

Please sign in to comment.