fathollahzadeh commented on code in PR #1672:
URL: https://github.com/apache/systemds/pull/1672#discussion_r954006399


##########
src/main/java/org/apache/sysds/hops/DataOp.java:
##########
@@ -283,20 +308,28 @@ public Lop constructLops()
                for (Entry<String, Integer> cur : _paramIndexMap.entrySet()) {
                        inputLops.put(cur.getKey(), 
getInput().get(cur.getValue()).constructLops());
                }
+               if(_ioGenRead)
+                       inputLops.put("iogenformat", 
_generateReaderOp.constructLops());
 
                // Create the lop
                switch(_op) 
                {
                        case TRANSIENTREAD:
-                               l = new Data(_op, null, inputLops, getName(), 
null, 
-                                               getDataType(), getValueType(), 
getFileFormat());
+                               if(!_ioGenRead)
+                                       l = new Data(_op, null, inputLops, 
getName(), null, getDataType(), getValueType(), getFileFormat());
+                               else
+                                       l = new DataIOGen(_op, null, inputLops, 
getName(), null, getDataType(), getValueType(), getIOGenFormat());
                                setOutputDimensions(l);
                                break;
                                
                        case PERSISTENTREAD:
-                               l = new Data(_op, null, inputLops, getName(), 
null, 
-                                               getDataType(), getValueType(), 
getFileFormat());
-                               
l.getOutputParameters().setDimensions(getDim1(), getDim2(), _inBlocksize, 
getNnz(), getUpdateType());
+                               if(!_ioGenRead){
+                                       l = new Data(_op, null, inputLops, 
getName(), null, getDataType(), getValueType(), getFileFormat());
+                                       
l.getOutputParameters().setDimensions(getDim1(), getDim2(), _inBlocksize, 
getNnz(), getUpdateType());
+                               }
+                               else
+                                       l = new DataIOGen(_op, null, inputLops, 
getName(), null, getDataType(), getValueType(), getIOGenFormat());

Review Comment:
   our design for IOGEN is like this:
   read(sample=x, sample_raw=$3,  format=$4, data_type="matrix")
   this read doesn't have any output like the current SystemsDS regular 
reading.  We are saving the JAVA source code in "format=$4" and due the next 
readers call that format, it is compiled and used. 



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