Page tree
Skip to end of metadata
Go to start of metadata

The Cast  field expression allows converting fields/expressions from one SchemaField.Type  data type to another.

 

    CAST(FIELDEXPRESSION AS TYPE)

    • FIELDEXPRESSION - Any legal field expression to apply the cast to.
    • TYPE - the type to cast to. Supports any legal schema field type.
    CAST(value AS DOUBLE) AS value
    
    import com.attivio.sdk.search.fields.Cast;
    import com.attivio.sdk.search.fields.StoredField;
    import com.attivio.sdk.schema.SchemaField;
    
    Cast field = new Cast( new StoredField("value"), SchemaField.Type.DOUBLE, "value" ) );
    • No labels