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

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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(org.antlr.v4.runtime.ParserRuleContext ctx, String functionName, ArrayList<ParameterExpression> passedParamExprs, String filename, CustomErrorListener errorListener)`
    `static DataExpression` | `getDataExpression(String functionName, ArrayList<ParameterExpression> passedParamExprs, ParseInfo parseInfo, 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... names)`
    `void` | `removeVarParam(String name)`
    `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, 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`

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

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

    - ### Methods inherited from interface org.apache.sysds.parser.ParseInfo

      `ctxAndFilenameToParseInfo`

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

    - #### 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 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 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()

Copyright © 2021 The Apache Software Foundation. All rights reserved.