Skip to content

Commit

Permalink
Merge pull request #7741 from xudong963/bump
Browse files Browse the repository at this point in the history
chore: upgrade rust-toolchain to nightly-2022-09-18
  • Loading branch information
mergify[bot] authored Sep 20, 2022
2 parents 9c5b602 + e41ed2e commit 6fdcc08
Show file tree
Hide file tree
Showing 130 changed files with 252 additions and 292 deletions.
72 changes: 31 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/doc/100-faq/40-how-to-write-scalar-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ It's really simple, `S: AsPrimitive<f64>` means we can accept a primitive value
```rust
impl Function for SqrtFunction {
fn name(&self) -> &str {
&*self.display_name
&self.display_name
}

fn return_type(&self) -> DataTypeImpl {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2022-06-30"
channel = "nightly-2022-09-18"
components = ["rustfmt", "clippy", "rust-src"]
10 changes: 4 additions & 6 deletions src/common/arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@ simd = ["arrow/simd"]
[dependencies] # In alphabetical order
# Workspace dependencies

# Github dependencies
arrow = { package = "arrow2", git = "https://github.com/datafuse-extras/arrow2", default-features = false, features = [
# Crates.io dependencies
arrow = { package = "arrow2", version = "0.14.0", default-features = false, features = [
"io_parquet",
"io_parquet_compression",
], rev = "4cdf6ff2" }

# Crates.io dependencies
] }
arrow-format = { version = "0.7.0", features = ["flight-data", "flight-service", "ipc"] }
futures = "0.3.21"
parquet2 = { version = "0.14", default_features = false }
parquet2 = { version = "0.16.3", default_features = false }

[dev-dependencies]
1 change: 1 addition & 0 deletions src/common/arrow/src/parquet_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pub async fn read_columns_many_async<'a, R: AsyncRead + AsyncSeek + Send + Unpin
field.to_owned(),
row_group.num_rows() as usize,
chunk_size,
None,
)?);
}
Ok(arrays)
Expand Down
1 change: 0 additions & 1 deletion src/common/base/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(backtrace)]
#![feature(thread_local)]
#![allow(incomplete_features)]

Expand Down
2 changes: 1 addition & 1 deletion src/common/building/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub fn add_env_credits_info() {
}
};

let names: Vec<String> = deps.iter().map(|x| (&x.name).to_string()).collect();
let names: Vec<String> = deps.iter().map(|x| (x.name).to_string()).collect();
let versions: Vec<String> = deps.iter().map(|x| x.version.to_string()).collect();
let licenses: Vec<String> = deps
.iter()
Expand Down
4 changes: 2 additions & 2 deletions src/common/cache/src/disk_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ where
key: K,
with: F,
) -> Result<()> {
self.insert_by(key, None, |path| with(File::create(&path)?))
self.insert_by(key, None, |path| with(File::create(path)?))
}

/// Add a file with `bytes` as its contents to the cache at path `key`.
pub fn insert_bytes<K: AsRef<OsStr>>(&mut self, key: K, bytes: &[u8]) -> Result<()> {
self.insert_by(key, Some(bytes.len() as u64), |path| {
let mut f = File::create(&path)?;
let mut f = File::create(path)?;
f.write_all(bytes)?;
Ok(())
})
Expand Down
2 changes: 0 additions & 2 deletions src/common/exception/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(backtrace)]

pub mod exception;
mod exception_code;
mod exception_flight;
Expand Down
2 changes: 1 addition & 1 deletion src/common/hashtable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ common-base = { path = "../base" }

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

[dev-dependencies]
Expand Down
25 changes: 13 additions & 12 deletions src/common/io/src/buffer/buffer_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
use std::cmp;
use std::fmt;
use std::io;
use std::io::BorrowedBuf;
use std::io::BorrowedCursor;
use std::io::ErrorKind;
use std::io::IoSliceMut;
use std::io::Read;
use std::io::ReadBuf;
use std::io::Result;
use std::mem::MaybeUninit;

Expand Down Expand Up @@ -94,21 +95,21 @@ impl<R: Read> std::io::Read for BufferReader<R> {
Ok(nread)
}

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

let prev = buf.filled_len();
let prev = cursor.written();

let mut rem = self.fill_buf()?;
rem.read_buf(buf)?;
rem.read_buf(cursor.reborrow())?;

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

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

// SAFETY: `self.init` is either 0 or set to `readbuf.initialized_len()`
// from the last time this function was called
unsafe {
readbuf.assume_init(self.init);
buf.set_init(self.init);
}

self.inner.read_buf(&mut readbuf)?;
self.inner.read_buf(buf.unfilled())?;

self.cap = readbuf.filled_len();
self.init = readbuf.initialized_len();
self.cap = buf.len();
self.init = buf.init_len();

self.pos = 0;
}
Expand Down
1 change: 0 additions & 1 deletion src/common/tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![feature(backtrace)]
#![deny(unused_crate_dependencies)]

#[macro_use]
Expand Down
22 changes: 9 additions & 13 deletions src/meta/api/src/share_api_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,13 +800,12 @@ impl<KV: KVApi> ShareApi for KV {
let mut objects = vec![];
for entry in entries {
let object = get_object_name_from_id(self, &database_name, entry.object).await?;
match object {
Some(object) => objects.push(ShareGrantReplyObject {
if let Some(object) = object {
objects.push(ShareGrantReplyObject {
object,
privileges: entry.privileges,
grant_on: entry.grant_on,
}),
None => {}
})
}
}

Expand Down Expand Up @@ -925,15 +924,12 @@ impl<KV: KVApi> ShareApi for KV {
};
let mut privileges = vec![];
for (entry, share_name) in entries {
match entry {
Some(entry) => {
privileges.push(ObjectGrantPrivilege {
share_name,
privileges: entry.privileges,
grant_on: entry.grant_on,
});
}
None => {}
if let Some(entry) = entry {
privileges.push(ObjectGrantPrivilege {
share_name,
privileges: entry.privileges,
grant_on: entry.grant_on,
});
}
}
Ok(GetObjectGrantPrivilegesReply { privileges })
Expand Down
Loading

1 comment on commit 6fdcc08

@vercel
Copy link

@vercel vercel bot commented on 6fdcc08 Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

databend – ./

databend-git-main-databend.vercel.app
databend.rs
databend-databend.vercel.app
databend.vercel.app

Please sign in to comment.