-
Notifications
You must be signed in to change notification settings - Fork 84
[email protected] depends on arrow11 #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -1,4 +1,4 @@ | |||
import {arrow9 as arrow} from "./dependencies.js"; | |||
import {arrow11 as arrow} from "./dependencies.js"; | |||
import {cdn} from "./require.js"; | |||
|
|||
// Returns true if the vaue is an Apache Arrow table. This uses a “duck” test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Returns true if the vaue is an Apache Arrow table. This uses a “duck” test | |
// Returns true if the value is an Apache Arrow table. This uses a “duck” test |
Listed below are the JS related changes in the latest apache-arrow releases. 10.0.0:
10.0.1:
11.0.0:
|
tested locally and this looks good from a Data Table & SQL cell perspective. i'm not sure what else needs to be tested though – what parts are you unsure about @Fil? |
The code works in all my tests too— the parts that I'm not sure of are:
Testing now… I have an (old) arrow file on my hard drive, adding it as a FileAttachment and calling:
both seem to return the same thing. The only difference I can spot is (of course) that they have different prototypes, because they're coming from different code bases. Maybe using arrow11 for version: 9 works too, and we could remove the dependency on version 9. We would need to just default case 9 to version 11.
|
Please don’t do this; it breaks backwards compatibility. Just add Arrow 11 as a new dependency. |
re: tests – i'm working on adding an integration test for arrays in a SQL cell. that should catch any issues at the point where we upgrade stdlib in the monorepo, although a unit test here would catch it earlier, so that would be great too. |
OK. So I guess that standing question is, is there any added value of adding {version: 11} as an option to FileAttachment.arrow()? It felt "wrong" not to add it (in the sense that we would be using 11 internally, but not offer it as an option), but I don't know what concrete difference it makes. |
Yes, we should add it; it is needed by the compiler so we’ll need a corresponding PR over there. |
are we good to re-upgrade stdlib in the monorepo, or do we need the compiler update to go in first? |
Upgrade stdlib first to add Arrow 11, then followup with the compiler update to use it. 👍 |
@mbostock sorry, could you say more about what we need to update in the compiler? i tested this upgrade locally and SQL cells seem to be working as expected. |
@annie My mistake. I was thinking of chart cells, but we don’t support Arrow tables as data sources for chart cells yet, so no compiler changes are necessary. This change should stand on its own! 👍 |
ok awesome, thanks for clarifying! |
[email protected] depends on arrow11 (after duckdb/duckdb-wasm@18dd6c7); because of this, with #356 loadDataSource does not create tables from arrays any more.
In this tentative PR I add full support for arrow11 on top of the existing arrow9 and arrow4. It might be enough to support arrow11 only in the case of duckdb, but supporting it as a filetype felt the right thing to do. (Not tested though.)
DEMO: https://observablehq.com/@observablehq/duckdb-1-24-breaks-insertion-in-sql-mode
Here's a unit test I wanted to add, unfortunately it fails because loadArrow() wants an http-resource.