jinchengchenghh commented on code in PR #41646:
URL: https://github.com/apache/arrow/pull/41646#discussion_r1645284541
##########
cpp/src/arrow/engine/substrait/serde.h:
##########
@@ -183,6 +184,13 @@ ARROW_ENGINE_EXPORT Result<BoundExpressions>
DeserializeExpressions(
const ConversionOptions& conversion_options = {},
ExtensionSet* ext_set_out = NULLPTR);
+/// \brief Deserialize a Substrait Literal message to the map
+///
+/// \param[in] buf a buffer containing the protobuf serialization of a
Substrait Literal
+/// \param[out] out deserialize to this map.
+ARROW_ENGINE_EXPORT Status
+DeserializeMap(const Buffer& buf, std::unordered_map<std::string,
std::string>& out);
Review Comment:
If we use map, it will be very hard to reconstruct,
https://stackoverflow.com/questions/4844022/jni-create-hashmap
##########
java/dataset/src/main/java/org/apache/arrow/dataset/scanner/FragmentScanOptions.java:
##########
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+package org.apache.arrow.dataset.scanner;
+
+import java.util.Map;
+
+public interface FragmentScanOptions {
+ String typeName();
+
+ int fileFormatId();
+
+ String[] serialize();
+
+ /**
+ * Serialize the map to string array.
+ *
+ * @param config config map
+ * @return string array for serialization
+ */
+ default String[] serializeMap(Map<String, String> config) {
Review Comment:
just converting
--
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]