You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "sgilmore10 (via GitHub)" <gi...@apache.org> on 2023/05/08 20:21:46 UTC

[GitHub] [arrow] sgilmore10 opened a new pull request, #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

sgilmore10 opened a new pull request, #35495:
URL: https://github.com/apache/arrow/pull/35495

   > **Warning** This pull request is dependent upon #35479 and #35491. We will rebase and mark as ready for reviewer once that one is merged.
   
   ### Rationale for this change
   Continuing to build the MATLAB interface to Arrow for numeric types. We're trying to keep the scope of these pull requests small to make them easier to review. 
   
   ### What changes are included in this PR?
   
   1. Added `arrow.array.Float32Array` MATLAB class
   2. Added new test class `tFloat32Array.m`
   
   ### Are these changes tested?
   
   1. Yes, added a new test class called `tFloat32Array.m`. 
   2. Qualified locally on macOS.
   
   ### Are there any user-facing changes?
   
   Yes, users can now create a array of float32 values.
   
   ### Future Directions
   
   1. Continue building out support for numeric arrays.
   2. Add shared validation functions.
   3. Make a shared test class for Numeric Arrays.


-- 
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] github-actions[bot] commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #35495:
URL: https://github.com/apache/arrow/pull/35495#issuecomment-1538998498

   * Closes: #35492


-- 
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] kou merged pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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


-- 
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] sgilmore10 commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   I'm not sure why there was a linker error in the macOS build. The [MATLAB action](https://github.com/mathworks/arrow/actions/runs/4959285646) passed in the mathworks/arrow fork. I noticed a couple of the other [MATLAB runs](https://github.com/mathworks/arrow/actions/runs/4949774932/jobs/8852423344) in mathworks/arrow have failed with the same linker error, but it the issue appears to be sporadic. I'll try re-running the action to see if it the same issue appears again.


-- 
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] sgilmore10 commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   Thanks for merging this @kou! We're going to look into this failure in the background. 


-- 
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] ursabot commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   ['Python', 'R'] benchmarks have high level of regressions.
   [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/5cfb953c7e8d486e9ceb43d05ee5d672...88c1e3aedee348d8966bb263ef015994/)
   


-- 
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] kou commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   OK.
   I'll merge this.


-- 
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] sgilmore10 commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   Hi @kou,
   
   The CI passed on the latest try. It looks like the CI sporadic and not related to this pull request because we've seen a couple of times 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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] sgilmore10 commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   We've captured this sporadic build failure as an [issue](https://github.com/mathworks/libmexclass/issues/58) in `mathworks/libmexclass`.


-- 
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] sgilmore10 commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   Marking this as ready for review.


-- 
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] ursabot commented on pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

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

   Benchmark runs are scheduled for baseline = 5ebd4c6127c3245d512d24670d0ecec51b149bb2 and contender = 660cb6efe1ab7e483f125c019839c57e5b2aeab4. 660cb6efe1ab7e483f125c019839c57e5b2aeab4 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/45f07ee4ab8349db9d63e3f6064e696a...950760036b014a8f9036ca2ecda49e9f/)
   [Failed :arrow_down:0.55% :arrow_up:0.0%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/4d675b251422475fb9e624c3d74bc93f...4ca5cc02911546139944cc20ee7fa87b/)
   [Finished :arrow_down:0.76% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/5cfb953c7e8d486e9ceb43d05ee5d672...88c1e3aedee348d8966bb263ef015994/)
   [Finished :arrow_down:0.54% :arrow_up:0.0%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/e1c0179eb65b4455a676558548c14f28...9a223188de8242aa94f5688cf6cb8f01/)
   Buildkite builds:
   [Finished] [`660cb6ef` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2873)
   [Failed] [`660cb6ef` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2909)
   [Finished] [`660cb6ef` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2874)
   [Finished] [`660cb6ef` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2899)
   [Finished] [`5ebd4c61` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/2872)
   [Failed] [`5ebd4c61` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/2908)
   [Finished] [`5ebd4c61` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/2873)
   [Finished] [`5ebd4c61` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/2898)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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] kou commented on a diff in pull request #35495: GH-35492 [MATLAB]: Add arrow.array.Float32Array MATLAB Class

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou commented on code in PR #35495:
URL: https://github.com/apache/arrow/pull/35495#discussion_r1193564526


##########
matlab/test/arrow/array/tFloat32Array.m:
##########
@@ -0,0 +1,99 @@
+classdef tFloat32Array < matlab.unittest.TestCase
+    % Tests for arrow.array.Float32rray
+
+    % 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.
+    
+    properties (TestParameter)
+        MakeDeepCopy = {true false}
+    end
+
+    methods(TestClassSetup)
+        function verifyOnMatlabPath(testCase)
+            % arrow.array.Float32Array must be on the MATLAB path.
+            testCase.assertTrue(~isempty(which('arrow.array.Float32Array')), ...
+                '''arrow.array.Float32Array'' must be on the MATLAB path. Use ''addpath'' to add folders to the MATLAB path.');
+        end
+    end
+    
+    methods(Test)
+        function Basic(testCase, MakeDeepCopy)
+            A = arrow.array.Float32Array(single([1, 2, 3]), DeepCopy=MakeDeepCopy);
+            className = string(class(A));
+            testCase.verifyEqual(className, "arrow.array.Float32Array");
+        end
+
+        function ShallowCopy(testCase)
+        % By default, Float32Array does not create a deep copy on
+        % construction when constructed from a MATLAB array. Instead,
+        % it stores a shallow copy of the array keep the memory alive.
+            A = arrow.array.Float32Array(single([1, 2, 3]));
+            testCase.verifyEqual(A.MatlabArray, single([1 2 3]));
+            testCase.verifyEqual(single(A), single([1 2 3]'));
+
+            A = arrow.array.Float32Array(single([1, 2, 3]), DeepCopy=false);
+            testCase.verifyEqual(A.MatlabArray, single([1 2 3]));
+            testCase.verifyEqual(single(A), single([1 2 3]'));
+        end
+
+        function DeepCopy(testCase)
+        % Verify Float32Array does not store shallow copy of the MATLAB
+        % array if DeepCopy=true was supplied.

Review Comment:
   ```suggestion
             % Verify Float32Array does not store shallow copy of the MATLAB
             % array if DeepCopy=true was supplied.
   ```



##########
matlab/test/arrow/array/tFloat32Array.m:
##########
@@ -0,0 +1,99 @@
+classdef tFloat32Array < matlab.unittest.TestCase
+    % Tests for arrow.array.Float32rray
+
+    % 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.
+    
+    properties (TestParameter)
+        MakeDeepCopy = {true false}
+    end
+
+    methods(TestClassSetup)
+        function verifyOnMatlabPath(testCase)
+            % arrow.array.Float32Array must be on the MATLAB path.
+            testCase.assertTrue(~isempty(which('arrow.array.Float32Array')), ...
+                '''arrow.array.Float32Array'' must be on the MATLAB path. Use ''addpath'' to add folders to the MATLAB path.');
+        end
+    end
+    
+    methods(Test)
+        function Basic(testCase, MakeDeepCopy)
+            A = arrow.array.Float32Array(single([1, 2, 3]), DeepCopy=MakeDeepCopy);
+            className = string(class(A));
+            testCase.verifyEqual(className, "arrow.array.Float32Array");
+        end
+
+        function ShallowCopy(testCase)
+        % By default, Float32Array does not create a deep copy on
+        % construction when constructed from a MATLAB array. Instead,
+        % it stores a shallow copy of the array keep the memory alive.

Review Comment:
   ```suggestion
               % By default, Float32Array does not create a deep copy on
               % construction when constructed from a MATLAB array. Instead,
               % it stores a shallow copy of the array keep the memory alive.
   ```



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