OlgaOvcharenko commented on code in PR #1857:
URL: https://github.com/apache/systemds/pull/1857#discussion_r1259839009


##########
src/main/java/org/apache/sysds/runtime/frame/data/columns/RaggedArray.java:
##########
@@ -49,207 +49,261 @@ public class RaggedArray<T> extends Array<T> {
         */
        public RaggedArray(T[] a, int m) {
                super(m);
-               throw new NotImplementedException();
+               this._a = ArrayFactory.create(a);
+       }
+
+       public RaggedArray(Array<T> a, int m) {
+               super(m);
+               this._a = a;
        }
 
        @Override
        public void write(DataOutput out) throws IOException {
-               throw new NotImplementedException("Unimplemented method 
'write'");
+               _a.write(out);
        }
 
        @Override
        public void readFields(DataInput in) throws IOException {
-               throw new NotImplementedException("Unimplemented method 
'readFields'");
+               _a.readFields(in);
        }
 
        @Override
        public T get(int index) {
-               throw new NotImplementedException("Unimplemented method 'get'");
+               if (index > super._size || index < 0)
+                       throw new ArrayIndexOutOfBoundsException("Index " + 
index + " out of bounds " + super._size);
+               return index < _a._size ? _a.get(index) : null;
+
+       }
+
+       protected Array<T> getInnerArray(){

Review Comment:
   Sure, resolved.



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