Skip to content

Commit 3b3e308

Browse files
authored
chore: Bump to rust 2024-02-08 (also 1.78) (#15456)
* ci: Bump version to 2024-02-08 (the same commit with 1.78) Signed-off-by: Xuanwo <github@xuanwo.io> * chore: Bump to rust 2024-02-08 (also 1.78) Signed-off-by: Xuanwo <github@xuanwo.io> --------- Signed-off-by: Xuanwo <github@xuanwo.io>
1 parent 5ca309e commit 3b3e308

File tree

8 files changed

+4
-237
lines changed

8 files changed

+4
-237
lines changed

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2024-01-23"
2+
channel = "nightly-2024-02-08"
33
components = ["rustfmt", "clippy", "rust-src", "miri", "rust-analyzer"]

src/common/arrow/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#![cfg_attr(feature = "simd", feature(portable_simd))]
1818
#![allow(clippy::redundant_closure_call)]
1919
#![allow(clippy::non_canonical_partial_ord_impl)]
20+
#![allow(dead_code)]
2021

2122
//#[macro_use]
2223
// mod errors;

src/common/io/src/binary_write.rs

Lines changed: 0 additions & 57 deletions
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-
use bytes::BufMut;
1615
use databend_common_exception::Result;
1716
use micromarshal::Marshal;
1817

@@ -85,62 +84,6 @@ where T: std::io::Write
8584
}
8685
}
8786

88-
// Another trait like BinaryWrite
89-
// This is aimed to make BufMut to implement it
90-
pub trait BinaryWriteBuf {
91-
fn write_scalar<V>(&mut self, v: &V) -> Result<()>
92-
where V: Marshal + StatBuffer;
93-
94-
fn write_opt_scalar<V>(&mut self, v: &Option<V>) -> Result<()>
95-
where V: Marshal + StatBuffer {
96-
match v {
97-
Some(v) => {
98-
self.write_scalar(&1u8)?;
99-
self.write_scalar(v)
100-
}
101-
None => self.write_scalar(&0u8),
102-
}
103-
}
104-
fn write_string(&mut self, text: impl AsRef<str>) -> Result<()>;
105-
fn write_uvarint(&mut self, v: u64) -> Result<()>;
106-
fn write_binary(&mut self, text: impl AsRef<[u8]>) -> Result<()>;
107-
}
108-
109-
// We must ensure there are enough buffer to write because BytesMut do not implicitly grow the buffer.
110-
impl<T> BinaryWriteBuf for T
111-
where T: BufMut
112-
{
113-
fn write_scalar<V>(&mut self, v: &V) -> Result<()>
114-
where V: Marshal + StatBuffer {
115-
let mut buffer = V::buffer();
116-
v.marshal(buffer.as_mut());
117-
118-
self.put_slice(buffer.as_ref());
119-
Ok(())
120-
}
121-
122-
fn write_string(&mut self, text: impl AsRef<str>) -> Result<()> {
123-
let bytes = text.as_ref().as_bytes();
124-
self.write_uvarint(bytes.len() as u64)?;
125-
self.put_slice(bytes);
126-
Ok(())
127-
}
128-
129-
fn write_uvarint(&mut self, v: u64) -> Result<()> {
130-
let mut scratch = [0u8; MAX_VARINT_LEN64];
131-
let ln = put_uvarint(&mut scratch[..], v);
132-
self.put_slice(&scratch[..ln]);
133-
Ok(())
134-
}
135-
136-
fn write_binary(&mut self, text: impl AsRef<[u8]>) -> Result<()> {
137-
let bytes = text.as_ref();
138-
self.write_uvarint(bytes.len() as u64)?;
139-
self.put_slice(bytes);
140-
Ok(())
141-
}
142-
}
143-
14487
// put_uvarint encodes a uint64 into buf and returns the number of bytes written.
14588
// If the buffer is too small, put_uvarint will panic.
14689
pub fn put_uvarint(mut buffer: impl AsMut<[u8]>, x: u64) -> usize {

src/meta/raft-store/src/sm_v002/leveled_store/map_api.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ where K: MapKey
9595
}
9696

9797
/// Trait for using Self as an implementation of the MapApi.
98+
#[allow(dead_code)]
9899
pub(in crate::sm_v002) trait AsMap {
99100
/// Use Self as an implementation of the [`MapApiRO`] (Read-Only) interface.
100101
fn as_map<K: MapKey>(&self) -> &impl MapApiRO<K>

src/query/expression/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#![feature(lazy_cell)]
4141
#![feature(try_blocks)]
4242
#![feature(let_chains)]
43+
#![feature(trait_upcasting)]
4344

4445
#[allow(dead_code)]
4546
mod block;

src/query/service/src/pipelines/processors/transforms/group_by/aggregator_state_entity.rs

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

src/query/service/src/pipelines/processors/transforms/group_by/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ mod aggregator_keys_builder;
1717
mod aggregator_keys_iter;
1818
mod aggregator_polymorphic_keys;
1919
mod aggregator_state;
20-
mod aggregator_state_entity;
2120
mod large_number;
2221

2322
pub use aggregator_groups_builder::*;

src/query/service/src/servers/flight/v1/exchange/exchange_params.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,11 @@
1414

1515
use std::sync::Arc;
1616

17-
use databend_common_arrow::arrow::io::ipc::write::WriteOptions;
18-
use databend_common_arrow::arrow::io::ipc::IpcField;
1917
use databend_common_expression::DataSchemaRef;
2018

2119
use crate::servers::flight::v1::exchange::ExchangeInjector;
2220
use crate::servers::flight::v1::scatter::FlightScatter;
2321

24-
#[derive(Clone)]
25-
pub struct SerializeParams {
26-
pub options: WriteOptions,
27-
pub ipc_fields: Vec<IpcField>,
28-
pub local_executor_pos: usize,
29-
}
30-
3122
#[derive(Clone)]
3223
pub struct ShuffleExchangeParams {
3324
pub query_id: String,

0 commit comments

Comments
 (0)