Comments (3)
@whjpji thanks, this seems string literal handling problem. Let's fix!
from tensorbase.
This is caused by fee911c#diff-7e3045dfedcbf998dd7fe82a9c43989c11678cd970c88b571f82a92284aaac16 (see below). It works if I revert the patch.
@jinmingjian Could you please tell me the reason why this change is undid after introduced by 8657b53#diff-d39e44a629780cf9d813c70da62a65754b9e39c69cba1cb454c6a84a6849faa4?
If it was not a mistake during refactoring, I guess it breaks the original logics dealing with strings in A-DF. Should we have a discussion of how to deal with the strings which differ in encoding between CH and A-DF?
diff --git a/arrow-datafusion/datafusion/src/logical_plan/expr.rs b/crates/datafusion/src/logical_plan/expr.rs
rename from arrow-datafusion/datafusion/src/logical_plan/expr.rs
rename to crates/datafusion/src/logical_plan/expr.rs
--- a/arrow-datafusion/datafusion/src/logical_plan/expr.rs (revision ca023f93d64d13ba36df89301faaa4c79fffeec6)
+++ b/crates/datafusion/src/logical_plan/expr.rs (revision fee911c0b97ea1f75b1ca1bc50e58eee93c911b1)
@@ -1061,23 +1061,13 @@
impl Literal for &str {
fn lit(&self) -> Expr {
- //FIXME debug_assert!(self.len()<128);
- let mut s = String::new();
- debug_assert!(self.len()<128);
- s.push(self.len() as u8 as char);
- s.push_str(self);
- Expr::Literal(ScalarValue::LargeUtf8(Some(s)))
+ Expr::Literal(ScalarValue::LargeUtf8(Some((*self).to_owned())))
}
}
impl Literal for String {
fn lit(&self) -> Expr {
- //FIXME debug_assert!(self.len()<128);
- let mut s = String::new();
- debug_assert!(self.len()<128);
- s.push(self.len() as u8 as char);
- s.push_str(self);
- Expr::Literal(ScalarValue::LargeUtf8(Some(s)))
+ Expr::Literal(ScalarValue::LargeUtf8(Some((*self).to_owned())))
}
}
from tensorbase.
@whjpji sorry, this addition is the first hack-in. But for the latter, I remove these addition. That's we should not modify the string in this place.
from tensorbase.
Related Issues (20)
- support CAST expression HOT 5
- move to_date out from mix-up in DataFusion HOT 3
- improve observability HOT 2
- Error compiling the master branch on macOS Catalina HOT 3
- parser not support boolean-valued functions HOT 2
- support Array type
- The server panics on existing `/tmp/tb_data` and `/tmp/tb_schema` HOT 3
- Partial Privacy Data Analysis HOT 2
- compile error: the trait bound `u64: ToUsize` is not satisfied on raspberry pi(armv7-unknown-linux-gnueabihf) HOT 3
- introduce DBC(Design By Contract) HOT 1
- tb does not support not null and default column value when creating table HOT 5
- How it is different with Datafuse? HOT 8
- integ_test_timing test is perhaps too strict HOT 1
- checksum for storage
- delete support
- enable TLS client connection
- more documents and comments for sources
- provides complete support Nullable(typename) data type. HOT 1
- support primary key
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorbase.