Add a failing test for updating a table with a headerless CSV.#3007
Closed
sinistersnare wants to merge 1 commit into
Closed
Add a failing test for updating a table with a headerless CSV.#3007sinistersnare wants to merge 1 commit into
sinistersnare wants to merge 1 commit into
Conversation
Signed-off-by: Davis Silverman <davis@thedav.is>
Contributor
Author
|
Here is the Rust example: use std::error::Error;
use perspective::client::{ColumnType, TableData, UpdateData};
use perspective::server::Server;
#[tokio::main(flavor = "multi_thread")]
async fn main() -> Result<(), Box<dyn Error>> {
let server = Server::default();
let client = server.new_local_client();
let schema = TableData::Schema(vec![("stringcol".into(), ColumnType::String)]);
let table = client.table(schema, Default::default()).await?;
// Note: No header row!
let update = UpdateData::Csv("A\nB\n".to_string());
table.update(update, Default::default()).await?;
let csv = table.view(None).await?.to_csv(Default::default()).await?;
println!("CSV:: {csv:?}");
client.close().await;
Ok(())
}$ cargo run
Compiling example_repo v1.0.0 (/Path/To/Example)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.53s
Running `target/debug/example_repo`
libc++abi: terminating due to uncaught exception of type std::invalid_argument: stoll: no conversion
[1] 19940 abort cargo run |
Member
|
This is becoming a bit out-of-scope as CSV parsing is no longer directly handled by Perspective, so I'm going to go ahead and close this. We may revisit the issue in the future as we broaden Perspective's engine support. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a test that crashes the test suite. It does not provide a fix, so the PR is marked as a draft for now.
Currently Perspective aborts in the C++ by updating a table with a CSV that has no header.
Results in
Fatal Python error: AbortedThis bug also occurs in Rust, see the example in the below comment