Skip to content

Commit fef6096

Browse files
committed
integrate dragonbox
1 parent 487d775 commit fef6096

File tree

19 files changed

+78
-2219
lines changed

19 files changed

+78
-2219
lines changed

NOTICE.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ Specifically:
1010
- Optimizer rule to replace SortMergeJoin with ShuffleHashJoin
1111

1212
This product includes software developed at
13-
DataFusion HDFS ObjectStore Contrib Package(https://github.com/datafusion-contrib/datafusion-objectstore-hdfs)
13+
DataFusion HDFS ObjectStore Contrib Package(https://github.com/datafusion-contrib/datafusion-objectstore-hdfs)
14+
15+
This product includes software developed at
16+
dragonbox (https://github.com/dtolnay/dragonbox)

native/Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
# under the License.
1717

1818
[workspace]
19-
default-members = ["core", "spark-expr", "proto"]
20-
members = ["core", "spark-expr", "proto", "hdfs"]
19+
default-members = ["core", "spark-expr", "proto", "dragonbox"]
20+
members = ["core", "spark-expr", "proto", "hdfs", "dragonbox"]
2121
resolver = "2"
2222

2323
[workspace.package]

native/dragonbox/Cargo.toml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
[package]
2-
name = "dragonbox"
3-
version = "0.1.10"
4-
authors = ["David Tolnay <dtolnay@gmail.com>"]
5-
categories = ["value-formatting", "no-std", "no-std::no-alloc"]
6-
description = "Fast floating point to string conversion"
7-
documentation = "https://docs.rs/dragonbox"
8-
edition = "2018"
9-
exclude = ["performance.png", "chart/**"]
10-
keywords = ["float"]
11-
license = "Apache-2.0 WITH LLVM-exception OR BSL-1.0"
12-
repository = "https://github.com/dtolnay/dragonbox"
13-
rust-version = "1.52"
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
1417

15-
[dev-dependencies]
16-
rand = "0.9"
18+
[package]
19+
name = "datafusion-comet-dragonbox"
20+
description = "Comet dragonbox integration"
21+
version = { workspace = true }
22+
homepage = { workspace = true }
23+
repository = { workspace = true }
24+
authors = { workspace = true }
25+
readme = { workspace = true }
26+
license = { workspace = true }
27+
edition = { workspace = true }
1728

1829
[package.metadata.docs.rs]
19-
targets = ["x86_64-unknown-linux-gnu"]
2030
rustdoc-args = [
2131
"--generate-link-to-definition",
2232
"--extern-html-root-url=core=https://doc.rust-lang.org",

native/dragonbox/LICENSE-Apache2-LLVM

Lines changed: 0 additions & 193 deletions
This file was deleted.

native/dragonbox/LICENSE-Boost

Lines changed: 0 additions & 23 deletions
This file was deleted.

native/dragonbox/README.md

Lines changed: 25 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,25 @@
1-
# Dragonbox
2-
3-
[<img alt="github" src="https://img.shields.io/badge/github-dtolnay/dragonbox-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/dtolnay/dragonbox)
4-
[<img alt="crates.io" src="https://img.shields.io/crates/v/dragonbox.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/dragonbox)
5-
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-dragonbox-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" height="20">](https://docs.rs/dragonbox)
6-
[<img alt="build status" src="https://img.shields.io/github/actions/workflow/status/dtolnay/dragonbox/ci.yml?branch=master&style=for-the-badge" height="20">](https://github.com/dtolnay/dragonbox/actions?query=branch%3Amaster)
7-
8-
This crate contains a basic port of <https://github.com/jk-jeon/dragonbox> to
9-
Rust for benchmarking purposes.
10-
11-
Please see the upstream repo for an explanation of the approach and comparison
12-
to the Ryū algorithm.
13-
14-
<br>
15-
16-
## Example
17-
18-
```rust
19-
fn main() {
20-
let mut buffer = dragonbox::Buffer::new();
21-
let printed = buffer.format(1.234);
22-
assert_eq!(printed, "1.234E0");
23-
}
24-
```
25-
26-
<br>
27-
28-
## Performance (lower is better)
29-
30-
![performance](https://raw.githubusercontent.com/dtolnay/dragonbox/master/performance.png)
31-
32-
<br>
33-
34-
#### License
35-
36-
<sup>
37-
Licensed under either of <a href="LICENSE-Apache2-LLVM">Apache License, Version
38-
2.0 with LLVM Exceptions</a> or <a href="LICENSE-Boost">Boost Software License
39-
Version 1.0</a> at your option.
40-
</sup>
41-
42-
<br>
43-
44-
<sub>
45-
Unless you explicitly state otherwise, any contribution intentionally submitted
46-
for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
47-
be dual licensed as above, without any additional terms or conditions.
48-
</sub>
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# Apache DataFusion Comet: dragonbox integration
21+
22+
This crate contains the dragonbox integration
23+
and is intended to be used as part of the Apache DataFusion Comet project
24+
25+
The binary floating-point to decimal floating-point conversion powered by [dragonbox](https://github.com/dtolnay/dragonbox).

0 commit comments

Comments
 (0)