Comments (3)
from incubator-horaedb.
Since ceresdb-client-py only needs the Datum
type, what do you think about the following change? Just feature-gate arrow-deps
for now.
diff --git a/common_types/Cargo.toml b/common_types/Cargo.toml
index ed2736d..59558f6 100644
--- a/common_types/Cargo.toml
+++ b/common_types/Cargo.toml
@@ -7,11 +7,12 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
+default = ["arrow_deps"]
test = []
[dependencies]
# In alphabetical order
-arrow_deps = { path = "../arrow_deps" }
+arrow_deps = { path = "../arrow_deps", optional = true }
byteorder = "1.2"
bytes = { path = "../components/bytes" }
chrono = "0.4"
diff --git a/common_types/src/datum.rs b/common_types/src/datum.rs
index 4e9dc03..84ff4e4 100644
--- a/common_types/src/datum.rs
+++ b/common_types/src/datum.rs
@@ -4,6 +4,7 @@
use std::{convert::TryFrom, fmt, str};
+#[cfg(feature = "arrow_deps")]
use arrow_deps::{
arrow::datatypes::{DataType, TimeUnit},
datafusion::scalar::ScalarValue,
@@ -156,6 +157,7 @@ impl DatumKind {
/// Create DatumKind from [arrow_deps::arrow::datatypes::DataType], if the
/// type is not supported, returns None
+ #[cfg(feature = "arrow_deps")]
pub fn from_data_type(data_type: &DataType) -> Option<Self> {
match data_type {
DataType::Null => Some(Self::Null),
@@ -223,6 +225,7 @@ impl DatumKind {
}
}
+#[cfg(feature = "arrow_deps")]
impl From<DatumKind> for DataType {
fn from(kind: DatumKind) -> Self {
match kind {
@@ -609,6 +612,7 @@ impl Datum {
}
}
+ #[cfg(feature = "arrow_deps")]
pub fn as_scalar_value(&self) -> Option<ScalarValue> {
match self {
Datum::Null => None,
@@ -787,6 +791,7 @@ impl<'a> DatumView<'a> {
}
}
+ #[cfg(feature = "arrow_deps")]
pub fn from_scalar_value(val: &'a ScalarValue) -> Option<Self> {
match val {
ScalarValue::Boolean(v) => v.map(DatumView::Boolean),
diff --git a/common_types/src/lib.rs b/common_types/src/lib.rs
index e247e2f..a07ca1c 100644
--- a/common_types/src/lib.rs
+++ b/common_types/src/lib.rs
@@ -3,14 +3,20 @@
//! Contains common types
pub mod bytes;
+#[cfg(feature = "arrow_deps")]
pub mod column;
+#[cfg(feature = "arrow_deps")]
pub mod column_schema;
pub mod datum;
pub mod hash;
+#[cfg(feature = "arrow_deps")]
pub mod projected_schema;
+#[cfg(feature = "arrow_deps")]
pub mod record_batch;
pub mod request_id;
+#[cfg(feature = "arrow_deps")]
pub mod row;
+#[cfg(feature = "arrow_deps")]
pub mod schema;
pub mod string;
pub mod time;
from incubator-horaedb.
Since ceresdb-client-py only needs the Datum type, what do you think about the following change? Just feature-gate arrow-deps for now.
This looks pretty neat to me 👍 would you like to submit this patch?
from incubator-horaedb.
Related Issues (20)
- Statistics about the shards' loads and instance's load
- Query improvement about the query partition table
- assertion failed: stats.cpu_usage > 0.0 HOT 2
- repo still has CLAassistant from pre-transfer legacy HOT 2
- thread 'read-high' panicked 'assertion failed: max.total_cmp(&min).is_ge()'
- Tracking issue for fix TODO comments HOT 8
- Build error: failed to run custom build command for `librocksdb_sys v0.1.0 HOT 7
- EnforceSorting caused by Internal error: Children cannot be replaced in Scan Table
- Object store get range support `0..` syntax
- `-h` causes horaectl to be unavailable HOT 1
- Tracking issue for compaction offload
- Replay WAL of different tables concurrently for TableBasedReplay HOT 1
- Improve log readability for horaemeta HOT 1
- Tracking issue for horaectl features HOT 2
- Build failed HOT 3
- benchmark failed HOT 1
- Explore new error define pattern
- Explore new serialization library used for communication between horaedb-server HOT 3
- Adapt to a variety of object storage. HOT 1
- UT of meta sometimes fails
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 incubator-horaedb.