Skip to content
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

castTimestampToDate does not work since arrow upgrade to v16 #1801

Open
kaciakmaciak opened this issue Jul 28, 2024 · 5 comments
Open

castTimestampToDate does not work since arrow upgrade to v16 #1801

kaciakmaciak opened this issue Jul 28, 2024 · 5 comments

Comments

@kaciakmaciak
Copy link

kaciakmaciak commented Jul 28, 2024

What happens?

castTimestampToDate option does not have effect since the arrow has been bumped to v16. The timestamps being returned as number.

To Reproduce

const duckdbInstance = new duckdb.AsyncDuckDB(logger, worker);
await duckdbInstance.open({
  query: {
    castTimestampToDate: true,
  },
});

const connection = await duckdbInstance.connect();
const result = await connection.query(`
  SELECT TIMESTAMP '1992-03-22 01:02:03' as value
`);
const value = result.toArray()[0]?.value; // value should be an instance of Date, but is a number

Browser/Environment:

any

Device:

any

DuckDB-Wasm Version:

1.28.1-dev242.0

DuckDB-Wasm Deployment:

shell.duckdb.org

Full Name:

Katarina Anton

Affiliation:

Individual

@kaciakmaciak
Copy link
Author

Please see an example in Codesandbox.

@carlopi
Copy link
Collaborator

carlopi commented Aug 23, 2024

I defer here to @domoritz, I don't think there has been any relevant change duckdb-wasm side / I am not sure what's preferable here, do you have any recommendations?

@domoritz
Copy link
Collaborator

I don't think there was any change in arrow related to this. Iirc duckdb chnages the output type not arrow.

@carlopi
Copy link
Collaborator

carlopi commented Aug 23, 2024

Thanks for chiming in, let me take a deeper look then

@kaciakmaciak
Copy link
Author

If that helps, if I force Arrow 15 to be installed, it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants