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
-
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
-
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, getPrivacy, getValueType, isScalarBoolean, setBlocksize, setBooleanProperties, setDataType, setDimensions, setDimensionValueProperties, setFileFormat, setIntProperties, setNnz, setPrivacy, setPrivacy, 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
-
-
-
-
Field Detail
-
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
-
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 Detail
-
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 Detail
-
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 classDataIdentifier
-
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)
-
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 classIdentifier
-
toString
public String toString()
- Overrides:
toString
in classDataIdentifier
-
variablesRead
public VariableSet variablesRead()
- Overrides:
variablesRead
in classDataIdentifier
-
variablesUpdated
public VariableSet variablesUpdated()
- Overrides:
variablesUpdated
in classDataIdentifier
-
isCSVReadWithUnknownSize
public boolean isCSVReadWithUnknownSize()
-
isLIBSVMReadWithUnknownSize
public boolean isLIBSVMReadWithUnknownSize()
-
isRead
public boolean isRead()
-
-