Skip to content

Commit

Permalink
Fix deserializing ints as strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkzinzow committed Dec 6, 2023
1 parent 4a2c336 commit ce4ac30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
7 changes: 5 additions & 2 deletions src/daft-json/src/decoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ fn deserialize_utf8_into<'a, O: Offset, A: Borrow<Value<'a>>>(
Number::Integer(number, exponent) | Number::Float(number, exponent) => {
scratch.clear();
scratch.extend_from_slice(number);
scratch.push(b'e');
scratch.extend_from_slice(exponent);
if !exponent.is_empty() {
scratch.push(b'e');
scratch.extend_from_slice(exponent);
}
target.push(simdutf8::basic::from_utf8(scratch.as_slice()).ok());
}
},
Value::Bool(v) => target.push(Some(if *v { "true" } else { "false" })),
Expand Down
5 changes: 0 additions & 5 deletions src/daft-json/src/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ pub fn read_json_bulk(
.await
})?;
tables.into_iter().collect::<DaftResult<Vec<_>>>()

// Sort the task results by task index, yielding tables whose order matches the input URI order.
// let mut collected = tables.into_iter().collect::<DaftResult<Vec<_>>>()?;
// collected.sort_by_key(|(idx, _)| *idx);
// Ok(collected.into_iter().map(|(_, v)| v).collect())
}

async fn read_json_single_into_table(
Expand Down

0 comments on commit ce4ac30

Please sign in to comment.