-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tycho/release-atomically
- Loading branch information
Showing
6 changed files
with
168 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
statement ok | ||
COPY (select * from '${PWD}/testdata/parquet/userdata1.parquet') to '${TMP}/userdata1.bson'; | ||
|
||
query I | ||
SELECT count(*) FROM '${TMP}/userdata1.bson'; | ||
---- | ||
1000 | ||
|
||
statement ok | ||
create table timestamps (t timestamp); | ||
|
||
statement ok | ||
insert into timestamps values (arrow_cast(946684860000000, 'Timestamp(Microsecond, None)')); | ||
|
||
query | ||
select * from timestamps; | ||
---- | ||
2000-01-01 00:01:00 | ||
|
||
statement ok | ||
copy timestamps to '${TMP}/timestamp_test_out.bson'; | ||
|
||
# bson's date format is an int64, of milliseconds since unix epoch; | ||
# which most closely maps to arrow's Date64, and since that's the only | ||
# date format, (the bson "timestamp" type is really a mongodb | ||
# implementation detail, generally regarded to be a mistake.) all | ||
# arrow timetstamp and date types are upcast or truncated into this | ||
# type. (Time64 and Time32 just go to integers) | ||
|
||
query | ||
select * from '${TMP}/timestamp_test_out.bson'; | ||
---- | ||
946684860000 |