Skip to content

Commit

Permalink
Empty cells are 'null', "null" is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Nov 19, 2023
1 parent 94e9497 commit 656f18d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ object DataType {
private val isBoolean: Regex = """^(true|false)$""".r
private val isDouble: Regex = """^([0-9]+?)\.([0-9]+)$""".r
private val isInt: Regex = """^([0-9]+)$""".r
private val isNull: Regex = """^(null)$""".r
private val isNull: Regex = """^$""".r

def decideType: String => DataType = {
case isBoolean(v) => BooleanData(v.toBoolean)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class EmbedDataTests extends munit.FunSuite {
}

test("Extract row data - csv - simple") {
val row = " abc,123, def,456.5 ,ghi789,true ,.,null, ,"
val row = " abc,123, def,456.5 ,ghi789,true ,.,, ,"

val actual =
EmbedData.extractRowData(row, ",")
Expand Down

0 comments on commit 656f18d

Please sign in to comment.