Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
Signed-off-by: zhongzc <zhongzc_arch@outlook.com>
  • Loading branch information
zhongzc committed Apr 26, 2020
1 parent 8a5f62b commit f6dea4a
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/coprocessor/codec/data_type/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,10 @@ pub use crate::coprocessor::codec::mysql::{Decimal, Duration, Json, Time as Date
pub use self::scalar::{ScalarValue, ScalarValueRef};
pub use self::vector::{VectorValue, VectorValueExt};

<<<<<<< HEAD:src/coprocessor/codec/data_type/mod.rs
use cop_datatype::EvalType;

use crate::coprocessor::dag::expr::EvalContext;
use crate::coprocessor::Result;
=======
use crate::EvalType;

use crate::codec::convert::ConvertTo;
use crate::expr::EvalContext;
use tidb_query_common::error::Result;
>>>>>>> 4175d68... tidb_query: fix converting bytes to bool (#7486):components/tidb_query_datatype/src/codec/data_type/mod.rs

/// A trait of evaluating current concrete eval type into a MySQL logic value, represented by
/// Rust's `bool` type.
Expand All @@ -53,12 +45,8 @@ impl AsMySQLBool for Real {
impl AsMySQLBool for Bytes {
#[inline]
fn as_mysql_bool(&self, context: &mut EvalContext) -> Result<bool> {
<<<<<<< HEAD:src/coprocessor/codec/data_type/mod.rs
Ok(!self.is_empty()
&& crate::coprocessor::codec::convert::bytes_to_int(context, self)? != 0)
=======
Ok(!self.is_empty() && ConvertTo::<f64>::convert(self, context)? != 0f64)
>>>>>>> 4175d68... tidb_query: fix converting bytes to bool (#7486):components/tidb_query_datatype/src/codec/data_type/mod.rs
&& crate::coprocessor::codec::convert::bytes_to_f64(context, self)? != 0f64)
}
}

Expand Down

0 comments on commit f6dea4a

Please sign in to comment.