xushiyan commented on code in PR #119:
URL: https://github.com/apache/hudi-rs/pull/119#discussion_r1770734688
##########
crates/core/src/config/table.rs:
##########
@@ -130,6 +130,7 @@ impl ConfigParser for HudiTableConfig {
match self {
Self::DatabaseName =>
Some(HudiConfigValue::String("default".to_string())),
Self::DropsPartitionFields =>
Some(HudiConfigValue::Boolean(false)),
+ Self::PartitionFields =>
Some(HudiConfigValue::List(vec!["".to_string()])),
Review Comment:
default as a list of an empty str ? should it be an empty list
##########
Cargo.toml:
##########
@@ -34,6 +34,8 @@ homepage = "https://github.com/apache/hudi-rs"
repository = "https://github.com/apache/hudi-rs"
[workspace.dependencies]
+log = "^0.4"
Review Comment:
follow style like others - don't introduce outlier
##########
crates/core/src/table/partitions.rs:
##########
@@ -0,0 +1,295 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use anyhow::anyhow;
+use anyhow::Result;
+use arrow_array::{ArrayRef, BooleanArray, Scalar, StringArray};
+use arrow_cast::{cast_with_options, CastOptions};
+use arrow_ord::cmp::{eq, gt, gt_eq, lt, lt_eq, neq};
+use arrow_schema::DataType;
+use std::borrow::Cow;
+use std::collections::HashMap;
+use std::iter::repeat;
+
+/// A special value used in Hive to represent the null partition in
partitioned tables
+pub const NULL_PARTITION_VALUE_DATA_PATH: &str = "__HIVE_DEFAULT_PARTITION__";
+
+/// A Enum used for selecting the partition value operation when filtering a
HudiTable partition.
+#[derive(Clone, Debug)]
+pub enum PartitionValue {
+ /// The partition value with the equal operator
+ Equal(Scalar<ArrayRef>),
Review Comment:
ArrayRef fits arrow's columnar characteristic but to model a partition value
here looks a bit weird - i'll do some digging
##########
crates/core/Cargo.toml:
##########
@@ -73,6 +74,5 @@ hudi-tests = { path = "../tests" }
datafusion = [
"dep:datafusion",
"datafusion-expr",
- "datafusion-common",
Review Comment:
why removed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]