kazdy commented on code in PR #170:
URL: https://github.com/apache/hudi-rs/pull/170#discussion_r1807286513


##########
python/src/internal.rs:
##########
@@ -30,12 +30,17 @@ use hudi::file_group::FileSlice;
 use hudi::table::builder::TableBuilder;
 use hudi::table::Table;
 
-macro_rules! vec_string_to_slice {
+fn convert_vec_to_slice(vec: &[(String, String, String)]) -> Vec<(&str, &str, 
&str)> {
+    vec.iter()
+        .map(|(a, b, c)| (a.as_str(), b.as_str(), c.as_str()))
+        .collect()
+}
+
+macro_rules! vec_to_slice {
     ($vec:expr) => {
-        &$vec.iter().map(AsRef::as_ref).collect::<Vec<_>>()
+        &convert_vec_to_slice(&$vec)[..]
     };
 }

Review Comment:
   I see that some modules in hudi core have utils.rs, I followed the same for 
this python crate for now



-- 
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]

Reply via email to