Package org.apache.sysds.parser

# Class DataExpression

java.lang.Object
org.apache.sysds.parser.Expression
org.apache.sysds.parser.Identifier
org.apache.sysds.parser.DataIdentifier
org.apache.sysds.parser.DataExpression

All Implemented Interfaces:
  `ParseInfo`

public class DataExpression extends DataIdentifier

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.sysds.parser.Expression

`Expression.BinaryOp, Expression.BooleanOp, Expression.DataOp, Expression.FunctCallOp, Expression.RelationalOp`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`AUTHORPARAM`
`static final String`
`COLUMNBLOCKCOUNTPARAM`
`static final String`
`CREATEDPARAM`
`static final String`
`DATATYPEPARAM`
`static final String`
`DEFAULT_DELIM_DELIMITER`
`static final boolean`
`DEFAULT_DELIM_FILL`
`static final double`
`DEFAULT_DELIM_FILL_VALUE`
`static final boolean`
`DEFAULT_DELIM_HAS_HEADER_ROW`
`static final boolean`
`DEFAULT_DELIM_SPARSE`
`static final String`
`DEFAULT_LIBSVM_INDEX_DELIM`
`static final String`
`DEFAULT_NA_STRINGS`
`static final String`
`DEFAULT_SCHEMAPARAM`
`static final String`
`DELIM_DELIMITER`
`static final String`
`DELIM_FILL`
`static final String`
`DELIM_FILL_VALUE`
`static final String`
`DELIM_HAS_HEADER_ROW`
`static final String`
`DELIM_NA_STRING_SEP`
`static final String`
`DELIM_NA_STRINGS`
`static final String`
`DELIM_SPARSE`
`static final String`
`DESCRIPTIONPARAM`
`static final String`
`FED_ADDRESSES`
`static final String`
`FED_LOCAL_OBJECT`
`static final String`
`FED_RANGES`
`static final String`
`FED_TYPE`
`static final Set<String>`
`FEDERATED_VALID_PARAM_NAMES`
`static final String`
`FINE_GRAINED_PRIVACY`
`static final String`
`FORMAT_TYPE`
`static final Set<String>`
`FRAME_VALID_PARAM_NAMES`
`static final String`
`HDF5_DATASET_NAME`
`static final String`
`IO_FILENAME`
`static final String`
`LIBSVM_INDEX_DELIM`
`static final String`
`PRIVACY`
`static final String`
`RAND_BY_ROW`
`static final String`
`RAND_COLS`
`static final String`
`RAND_DATA`
`static final String`
`RAND_DIMNAMES`
`static final String`
`RAND_DIMS`
`static final String`
`RAND_LAMBDA`
`static final String`
`RAND_MAX`
`static final String`
`RAND_MIN`
`static final String`
`RAND_PDF`
`static final String`
`RAND_PDF_UNIFORM`
`static final String`
`RAND_ROWS`
`static final String`
`RAND_SEED`
`static final String`
`RAND_SPARSITY`
`static final Set<String>`
`RAND_VALID_PARAM_NAMES`
`static final Set<String>`
`READ_VALID_MTD_PARAM_NAMES`
Valid parameter names in metadata file
`static final Set<String>`
`READ_VALID_PARAM_NAMES`
Valid parameter names in arguments to read instruction
`static final String`
`READCOLPARAM`
`static final String`
`READNNZPARAM`
`static final String`
`READROWPARAM`
`static final Set<String>`
`RESHAPE_VALID_PARAM_NAMES`
`static final String`
`ROWBLOCKCOUNTPARAM`
`static final String`
`SCHEMAPARAM`
`static final String`
`SQL_CONN`
`static final String`
`SQL_PASS`
`static final String`
`SQL_QUERY`
`static final String`
`SQL_USER`
`static final Set<String>`
`SQL_VALID_PARAM_NAMES`
`static final String`
`VALUETYPEPARAM`

## Constructor Summary

Constructors
Constructor
Description
`DataExpression()`
`DataExpression(org.antlr.v4.runtime.ParserRuleContext ctx, Expression.DataOp op, HashMap<String,Expression> varParams, String filename)`
`DataExpression(Expression.DataOp op, HashMap<String,Expression> varParams, ParseInfo parseInfo)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addFederatedExprParam(String paramName, Expression paramValue)`
`void`
`addFrameExprParam(String paramName, Expression paramValue)`
`void`
`addMatrixExprParam(String paramName, Expression paramValue)`
`void`
`addRandExprParam(String paramName, Expression paramValue)`
`void`
`addSqlExprParam(String paramName, Expression paramValue)`
`void`
`addTensorExprParam(String paramName, Expression paramValue)`
`void`
`addVarParam(String name, Expression value)`
`static DataExpression`
`getDataExpression(String functionName, ArrayList<ParameterExpression> passedParamExprs, ParseInfo parseInfo, CustomErrorListener errorListener)`
`static DataExpression`
`getDataExpression(org.antlr.v4.runtime.ParserRuleContext ctx, String functionName, ArrayList<ParameterExpression> passedParamExprs, String filename, CustomErrorListener errorListener)`
`static String`
`getMTDFileName(String inputFileName)`
`Expression.DataOp`
`getOpCode()`
`Expression`
`getVarParam(String name)`
`HashMap<String,Expression>`
`getVarParams()`
`boolean`
`isCSVReadWithUnknownSize()`
`boolean`
`isLIBSVMReadWithUnknownSize()`
`boolean`
`isRead()`
`void`
`removeVarParam(String name)`
`void`
`removeVarParam(String... names)`
`Expression`
`rewriteExpression(String prefix)`
`void`
`setCheckMetadata(boolean checkMetadata)`
`void`
`setFederatedDefault()`
`void`
`setFrameDefault()`
`void`
`setMatrixDefault()`
By default we use rowwise matrix reshape according to our internal dense/sparse matrix representations.
`void`
`setOpCode(Expression.DataOp op)`
`void`
`setRandDefault()`
`void`
`setTensorDefault()`
`void`
`setVarParams(HashMap<String,Expression> varParams)`
`String`
`toString()`
`void`
`validateExpression(HashMap<String,DataIdentifier> ids, HashMap<String,ConstIdentifier> currConstVars, boolean conditional)`
Validate parse tree : Process Data Expression in an assignment statement
`VariableSet`
`variablesRead()`
`VariableSet`
`variablesUpdated()`

### Methods inherited from class org.apache.sysds.parser.DataIdentifier

`equals, getName, hashCode, multipleReturns, setName`

### Methods inherited from class org.apache.sysds.parser.Identifier

`computeDataType, dimsKnown, getBlocksize, getDataType, getDim1, getDim2, getFileFormat, getNnz, getValueType, isScalarBoolean, setBlocksize, setBooleanProperties, setDataType, setDimensions, setDimensionValueProperties, setFileFormat, setIntProperties, setNnz, setProperties, setValueType`

### Methods inherited from class org.apache.sysds.parser.Expression

`computeDataType, computeDataType, computeValueType, computeValueType, computeValueType, convertFormatType, getBeginColumn, getBeginLine, getBinaryMatrixCharacteristics, getBinaryOp, getBooleanOp, getEndColumn, getEndLine, getFilename, getOutput, getOutputs, getParseExceptionList, getRelationalOp, getTempName, getText, printErrorLocation, printInfoLocation, printWarningLocation, raiseValidateError, raiseValidateError, raiseValidateError, setBeginColumn, setBeginLine, setCtxValues, setCtxValuesAndFilename, setEndColumn, setEndLine, setFilename, setOutput, setParseExceptionList, setParseInfo, setText, validateExpression`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### RAND_DIMS

public static final String RAND_DIMS

See Also:
  - Constant Field Values

### RAND_ROWS

public static final String RAND_ROWS

See Also:
  - Constant Field Values

### RAND_COLS

public static final String RAND_COLS

See Also:
  - Constant Field Values

### RAND_MIN

public static final String RAND_MIN

See Also:
  - Constant Field Values

### RAND_MAX

public static final String RAND_MAX

See Also:
  - Constant Field Values

### RAND_SPARSITY

public static final String RAND_SPARSITY

See Also:
  - Constant Field Values

### RAND_SEED

public static final String RAND_SEED

See Also:
  - Constant Field Values

### RAND_PDF

public static final String RAND_PDF

See Also:
  - Constant Field Values

### RAND_LAMBDA

public static final String RAND_LAMBDA

See Also:
  - Constant Field Values

### RAND_PDF_UNIFORM

public static final String RAND_PDF_UNIFORM

See Also:
  - Constant Field Values

### RAND_BY_ROW

public static final String RAND_BY_ROW

See Also:
  - Constant Field Values

### RAND_DIMNAMES

public static final String RAND_DIMNAMES

See Also:
  - Constant Field Values

### RAND_DATA

public static final String RAND_DATA

See Also:
  - Constant Field Values

### IO_FILENAME

public static final String IO_FILENAME

See Also:
  - Constant Field Values

### READROWPARAM

public static final String READROWPARAM

See Also:
  - Constant Field Values

### READCOLPARAM

public static final String READCOLPARAM

See Also:
  - Constant Field Values

### READNNZPARAM

public static final String READNNZPARAM

See Also:
  - Constant Field Values

### SQL_CONN

public static final String SQL_CONN

See Also:
  - Constant Field Values

### SQL_USER

public static final String SQL_USER

See Also:
  - Constant Field Values

### SQL_PASS

public static final String SQL_PASS

See Also:
  - Constant Field Values

### SQL_QUERY

public static final String SQL_QUERY

See Also:
  - Constant Field Values

### FED_ADDRESSES

public static final String FED_ADDRESSES

See Also:
  - Constant Field Values

### FED_RANGES

public static final String FED_RANGES

See Also:
  - Constant Field Values

### FED_TYPE

public static final String FED_TYPE

See Also:
  - Constant Field Values

### FED_LOCAL_OBJECT

public static final String FED_LOCAL_OBJECT

See Also:
  - Constant Field Values

### FORMAT_TYPE

public static final String FORMAT_TYPE

See Also:
  - Constant Field Values

### ROWBLOCKCOUNTPARAM

public static final String ROWBLOCKCOUNTPARAM

See Also:
  - Constant Field Values

### COLUMNBLOCKCOUNTPARAM

public static final String COLUMNBLOCKCOUNTPARAM

See Also:
  - Constant Field Values

### DATATYPEPARAM

public static final String DATATYPEPARAM

See Also:
  - Constant Field Values

### VALUETYPEPARAM

public static final String VALUETYPEPARAM

See Also:
  - Constant Field Values

### DESCRIPTIONPARAM

public static final String DESCRIPTIONPARAM

See Also:
  - Constant Field Values

### AUTHORPARAM

public static final String AUTHORPARAM

See Also:
  - Constant Field Values

### SCHEMAPARAM

public static final String SCHEMAPARAM

See Also:
  - Constant Field Values

### CREATEDPARAM

public static final String CREATEDPARAM

See Also:
  - Constant Field Values

### PRIVACY

public static final String PRIVACY

See Also:
  - Constant Field Values

### FINE_GRAINED_PRIVACY

public static final String FINE_GRAINED_PRIVACY

See Also:
  - Constant Field Values

### DELIM_DELIMITER

public static final String DELIM_DELIMITER

See Also:
  - Constant Field Values

### DELIM_HAS_HEADER_ROW

public static final String DELIM_HAS_HEADER_ROW

See Also:
  - Constant Field Values

### DELIM_FILL

public static final String DELIM_FILL

See Also:
  - Constant Field Values

### DELIM_FILL_VALUE

public static final String DELIM_FILL_VALUE

See Also:
  - Constant Field Values

### DELIM_NA_STRINGS

public static final String DELIM_NA_STRINGS

See Also:
  - Constant Field Values

### DELIM_NA_STRING_SEP

public static final String DELIM_NA_STRING_SEP

See Also:
  - Constant Field Values

### LIBSVM_INDEX_DELIM

public static final String LIBSVM_INDEX_DELIM

See Also:
  - Constant Field Values

### HDF5_DATASET_NAME

public static final String HDF5_DATASET_NAME

See Also:
  - Constant Field Values

### DELIM_SPARSE

public static final String DELIM_SPARSE

See Also:
  - Constant Field Values

### RAND_VALID_PARAM_NAMES

public static final Set<String> RAND_VALID_PARAM_NAMES

### RESHAPE_VALID_PARAM_NAMES

public static final Set<String> RESHAPE_VALID_PARAM_NAMES

### FRAME_VALID_PARAM_NAMES

public static final Set<String> FRAME_VALID_PARAM_NAMES

### SQL_VALID_PARAM_NAMES

public static final Set<String> SQL_VALID_PARAM_NAMES

### FEDERATED_VALID_PARAM_NAMES

public static final Set<String> FEDERATED_VALID_PARAM_NAMES

### READ_VALID_MTD_PARAM_NAMES

public static final Set<String> READ_VALID_MTD_PARAM_NAMES
Valid parameter names in metadata file

### READ_VALID_PARAM_NAMES

public static final Set<String> READ_VALID_PARAM_NAMES
Valid parameter names in arguments to read instruction

### DEFAULT_DELIM_DELIMITER

public static final String DEFAULT_DELIM_DELIMITER

See Also:
  - Constant Field Values

### DEFAULT_DELIM_HAS_HEADER_ROW

public static final boolean DEFAULT_DELIM_HAS_HEADER_ROW

See Also:
  - Constant Field Values

### DEFAULT_DELIM_FILL

public static final boolean DEFAULT_DELIM_FILL

See Also:
  - Constant Field Values

### DEFAULT_DELIM_FILL_VALUE

public static final double DEFAULT_DELIM_FILL_VALUE

See Also:
  - Constant Field Values

### DEFAULT_DELIM_SPARSE

public static final boolean DEFAULT_DELIM_SPARSE

See Also:
  - Constant Field Values

### DEFAULT_NA_STRINGS

public static final String DEFAULT_NA_STRINGS

See Also:
  - Constant Field Values

### DEFAULT_SCHEMAPARAM

public static final String DEFAULT_SCHEMAPARAM

See Also:
  - Constant Field Values

### DEFAULT_LIBSVM_INDEX_DELIM

public static final String DEFAULT_LIBSVM_INDEX_DELIM

See Also:
  - Constant Field Values

## Constructor Details

### DataExpression

public DataExpression()

### DataExpression

public DataExpression(Expression.DataOp op, HashMap<String,Expression> varParams, ParseInfo parseInfo)

### DataExpression

public DataExpression(org.antlr.v4.runtime.ParserRuleContext ctx, Expression.DataOp op, HashMap<String,Expression> varParams, String filename)

## Method Details

### setCheckMetadata

public void setCheckMetadata(boolean checkMetadata)

### getDataExpression

public static DataExpression getDataExpression(org.antlr.v4.runtime.ParserRuleContext ctx, String functionName, ArrayList<ParameterExpression> passedParamExprs, String filename, CustomErrorListener errorListener)

### getDataExpression

public static DataExpression getDataExpression(String functionName, ArrayList<ParameterExpression> passedParamExprs, ParseInfo parseInfo, CustomErrorListener errorListener)

### addRandExprParam

public void addRandExprParam(String paramName, Expression paramValue)

### addMatrixExprParam

public void addMatrixExprParam(String paramName, Expression paramValue)

### addFrameExprParam

public void addFrameExprParam(String paramName, Expression paramValue)

### addTensorExprParam

public void addTensorExprParam(String paramName, Expression paramValue)

### addSqlExprParam

public void addSqlExprParam(String paramName, Expression paramValue)

### addFederatedExprParam

public void addFederatedExprParam(String paramName, Expression paramValue)

### rewriteExpression

public Expression rewriteExpression(String prefix)

Overrides:
  `rewriteExpression` in class `DataIdentifier`

### setMatrixDefault

public void setMatrixDefault()
By default we use rowwise matrix reshape according to our internal dense/sparse matrix representations. ByRow specifies both input and output orientation. Note that this is different from R, where inputs are always read by-column and the default for byRow is by-column as well.

### setFrameDefault

public void setFrameDefault()

### setTensorDefault

public void setTensorDefault()

### setFederatedDefault

public void setFederatedDefault()

### setRandDefault

public void setRandDefault()

### setOpCode

public void setOpCode(Expression.DataOp op)

### getOpCode

public Expression.DataOp getOpCode()

### getVarParams

public HashMap<String,Expression> getVarParams()

### setVarParams

public void setVarParams(HashMap<String,Expression> varParams)

### getVarParam

public Expression getVarParam(String name)

### addVarParam

public void addVarParam(String name, Expression value)

### removeVarParam

public void removeVarParam(String name)

### removeVarParam

public void removeVarParam(String... names)

### getMTDFileName

public static String getMTDFileName(String inputFileName)

### validateExpression

public void validateExpression(HashMap<String,DataIdentifier> ids, HashMap<String,ConstIdentifier> currConstVars, boolean conditional)
Validate parse tree : Process Data Expression in an assignment statement

Overrides:
  `validateExpression` in class `Identifier`

### toString

public String toString()

Overrides:
  `toString` in class `DataIdentifier`

### variablesRead

public VariableSet variablesRead()

Overrides:
  `variablesRead` in class `DataIdentifier`

### variablesUpdated

public VariableSet variablesUpdated()

Overrides:
  `variablesUpdated` in class `DataIdentifier`

### isCSVReadWithUnknownSize

public boolean isCSVReadWithUnknownSize()

### isLIBSVMReadWithUnknownSize

public boolean isLIBSVMReadWithUnknownSize()

### isRead

public boolean isRead()