Skip to content

Commit 28abfdc

Browse files
committed
chore: upgrade rust-toolchain to nightly-2022-09-18
1 parent 24ea516 commit 28abfdc

File tree

130 files changed

+252
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+252
-294
lines changed

Cargo.lock

+31-41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/doc/100-faq/40-how-to-write-scalar-functions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ It's really simple, `S: AsPrimitive<f64>` means we can accept a primitive value
155155
```rust
156156
impl Function for SqrtFunction {
157157
fn name(&self) -> &str {
158-
&*self.display_name
158+
&self.display_name
159159
}
160160

161161
fn return_type(&self) -> DataTypeImpl {

rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-06-30"
2+
channel = "nightly-2022-09-18"
33
components = ["rustfmt", "clippy", "rust-src"]

scripts/setup/rust-toolchain.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2022-06-30"
2+
channel = "nightly-2022-09-18"
33
components = ["rustfmt", "clippy", "rust-src"]

src/common/arrow/Cargo.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,13 @@ simd = ["arrow/simd"]
3333
[dependencies] # In alphabetical order
3434
# Workspace dependencies
3535

36-
# Github dependencies
37-
arrow = { package = "arrow2", git = "https://github.com/datafuse-extras/arrow2", default-features = false, features = [
36+
# Crates.io dependencies
37+
arrow = { package = "arrow2", version = "0.14.0", default-features = false, features = [
3838
"io_parquet",
3939
"io_parquet_compression",
40-
], rev = "4cdf6ff2" }
41-
42-
# Crates.io dependencies
40+
] }
4341
arrow-format = { version = "0.7.0", features = ["flight-data", "flight-service", "ipc"] }
4442
futures = "0.3.21"
45-
parquet2 = { version = "0.14", default_features = false }
43+
parquet2 = { version = "0.16.3", default_features = false }
4644

4745
[dev-dependencies]

src/common/arrow/src/parquet_read.rs

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ pub async fn read_columns_many_async<'a, R: AsyncRead + AsyncSeek + Send + Unpin
7575
field.to_owned(),
7676
row_group.num_rows() as usize,
7777
chunk_size,
78+
None,
7879
)?);
7980
}
8081
Ok(arrays)

src/common/base/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![feature(backtrace)]
1615
#![feature(thread_local)]
1716
#![allow(incomplete_features)]
1817

src/common/building/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub fn add_env_credits_info() {
9292
}
9393
};
9494

95-
let names: Vec<String> = deps.iter().map(|x| (&x.name).to_string()).collect();
95+
let names: Vec<String> = deps.iter().map(|x| (x.name).to_string()).collect();
9696
let versions: Vec<String> = deps.iter().map(|x| x.version.to_string()).collect();
9797
let licenses: Vec<String> = deps
9898
.iter()

src/common/cache/src/disk_cache.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,13 @@ where
245245
key: K,
246246
with: F,
247247
) -> Result<()> {
248-
self.insert_by(key, None, |path| with(File::create(&path)?))
248+
self.insert_by(key, None, |path| with(File::create(path)?))
249249
}
250250

251251
/// Add a file with `bytes` as its contents to the cache at path `key`.
252252
pub fn insert_bytes<K: AsRef<OsStr>>(&mut self, key: K, bytes: &[u8]) -> Result<()> {
253253
self.insert_by(key, Some(bytes.len() as u64), |path| {
254-
let mut f = File::create(&path)?;
254+
let mut f = File::create(path)?;
255255
f.write_all(bytes)?;
256256
Ok(())
257257
})

src/common/exception/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![feature(backtrace)]
16-
1715
pub mod exception;
1816
mod exception_code;
1917
mod exception_flight;

src/common/hashtable/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ common-base = { path = "../base" }
1616

1717
# Crates.io dependencies
1818
ahash = "0.7.6"
19-
ordered-float = { git = "https://github.com/andylokandy/rust-ordered-float.git", branch = "as", features = ["serde"] }
19+
ordered-float = { version = "3.1.0", features = ["serde"] }
2020
primitive-types = "0.11.1"
2121

2222
[dev-dependencies]

src/common/io/src/buffer/buffer_reader.rs

+13-12
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
use std::cmp;
1616
use std::fmt;
1717
use std::io;
18+
use std::io::BorrowedBuf;
19+
use std::io::BorrowedCursor;
1820
use std::io::ErrorKind;
1921
use std::io::IoSliceMut;
2022
use std::io::Read;
21-
use std::io::ReadBuf;
2223
use std::io::Result;
2324
use std::mem::MaybeUninit;
2425

@@ -94,21 +95,21 @@ impl<R: Read> std::io::Read for BufferReader<R> {
9495
Ok(nread)
9596
}
9697

97-
fn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> io::Result<()> {
98+
fn read_buf(&mut self, mut cursor: BorrowedCursor<'_>) -> io::Result<()> {
9899
// If we don't have any buffered data and we're doing a massive read
99100
// (larger than our internal buffer), bypass our internal buffer
100101
// entirely.
101-
if self.pos == self.cap && buf.remaining() >= self.buf.len() {
102+
if self.pos == self.cap && cursor.capacity() >= self.buf.len() {
102103
self.discard_buffer();
103-
return self.inner.read_buf(buf);
104+
return self.inner.read_buf(cursor.reborrow());
104105
}
105106

106-
let prev = buf.filled_len();
107+
let prev = cursor.written();
107108

108109
let mut rem = self.fill_buf()?;
109-
rem.read_buf(buf)?;
110+
rem.read_buf(cursor.reborrow())?;
110111

111-
self.consume(buf.filled_len() - prev); //slice impl of read_buf known to never unfill buf
112+
self.consume(cursor.written() - prev); //slice impl of read_buf known to never unfill buf
112113

113114
Ok(())
114115
}
@@ -178,18 +179,18 @@ impl<R: Read> BufferRead for BufferReader<R> {
178179
fn fill_buf(&mut self) -> Result<&[u8]> {
179180
if self.pos >= self.cap {
180181
debug_assert!(self.pos == self.cap);
181-
let mut readbuf = ReadBuf::uninit(&mut self.buf);
182+
let mut buf = BorrowedBuf::from(&mut (*self.buf));
182183

183184
// SAFETY: `self.init` is either 0 or set to `readbuf.initialized_len()`
184185
// from the last time this function was called
185186
unsafe {
186-
readbuf.assume_init(self.init);
187+
buf.set_init(self.init);
187188
}
188189

189-
self.inner.read_buf(&mut readbuf)?;
190+
self.inner.read_buf(buf.unfilled())?;
190191

191-
self.cap = readbuf.filled_len();
192-
self.init = readbuf.initialized_len();
192+
self.cap = buf.len();
193+
self.init = buf.init_len();
193194

194195
self.pos = 0;
195196
}

src/common/tracing/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#![feature(backtrace)]
1615
#![deny(unused_crate_dependencies)]
1716

1817
#[macro_use]

0 commit comments

Comments
 (0)