You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/04/11 13:34:37 UTC

[GitHub] [arrow-rs] tustvold opened a new pull request, #4052: Remove old JSON Reader and Decoder (#3610)

tustvold opened a new pull request, #4052:
URL: https://github.com/apache/arrow-rs/pull/4052

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #3610
   
   # Rationale for this change
    
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   This removes a deprecated API
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking change` label.
   -->
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4052: Remove old JSON Reader and Decoder (#3610)

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #4052:
URL: https://github.com/apache/arrow-rs/pull/4052#discussion_r1162899706


##########
arrow-json/src/reader/mod.rs:
##########
@@ -554,14 +556,8 @@ impl RawDecoder {
         assert_eq!(decoded.null_count(), 0);
         assert_eq!(decoded.len(), pos.len());
 
-        // Clear out buffer
-        let columns = decoded
-            .child_data()
-            .iter()
-            .map(|x| make_array(x.clone()))
-            .collect();
-
-        let batch = RecordBatch::try_new(self.schema.clone(), columns)?;
+        let batch = RecordBatch::from(StructArray::from(decoded))

Review Comment:
   This is the fix for #4053 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold merged pull request #4052: Remove old JSON Reader and Decoder (#3610)

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold merged PR #4052:
URL: https://github.com/apache/arrow-rs/pull/4052


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold commented on pull request #4052: Remove old JSON Reader and Decoder (#3610)

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on PR #4052:
URL: https://github.com/apache/arrow-rs/pull/4052#issuecomment-1503398194

   I'm working on porting more of the tests across


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold commented on a diff in pull request #4052: Remove old JSON Reader and Decoder (#3610)

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold commented on code in PR #4052:
URL: https://github.com/apache/arrow-rs/pull/4052#discussion_r1162828560


##########
arrow-json/src/reader/schema.rs:
##########
@@ -0,0 +1,509 @@
+// 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 std::borrow::Borrow;
+use std::collections::{HashMap, HashSet};
+use std::io::{BufRead, BufReader, Read, Seek};
+use std::sync::Arc;
+use serde_json::Value;
+use arrow_schema::{ArrowError, DataType, Field, Fields, Schema};
+
+#[derive(Debug, Clone)]

Review Comment:
   This is just moved from reader.rs



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org