Package org.rumbledb.items
Class FunctionItem
java.lang.Object
org.rumbledb.items.FunctionItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
,Item
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FunctionItem
(FunctionIdentifier identifier, List<Name> parameterNames, FunctionSignature signature, DynamicContext dynamicModuleContext, RuntimeIterator bodyIterator) FunctionItem
(FunctionIdentifier identifier, List<Name> parameterNames, FunctionSignature signature, DynamicContext dynamicModuleContext, RuntimeIterator bodyIterator, Map<Name, List<Item>> localVariablesInClosure, Map<Name, org.apache.spark.api.java.JavaRDD<Item>> RDDVariablesInClosure, Map<Name, JSoundDataFrame> DFVariablesInClosure) FunctionItem
(Name name, Map<Name, SequenceType> paramNameToSequenceTypes, SequenceType returnType, DynamicContext dynamicModuleContext, RuntimeIterator bodyIterator, boolean isUpdating) -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()
boolean
Tests for logical equality.Returns the body iterator, if it is a function item.Returns the DataFrame variable bindings, if it is a function item.Returns the dynamic type of the item (only for error message purposes).boolean
Returns the effective boolean value of the item, if atomic.org.apache.spark.ml.Estimator<?>
Returns the identifier (name and arity) of the function, if it is a function item.Returns the local variable bindings, if it is a function item.Returns the module dynamic context, if it is a function item.Returns the names of the parameters of the function, if it is a function item.Returns the RDD variable bindings, if it is a function item.Returns the signature of the function, if it is a function item.org.apache.spark.ml.Transformer
int
hashCode()
Computes a hash code.boolean
isAtomic()
Tests whether the item is an atomic item.boolean
boolean
Tests whether the item is a function.boolean
void
populateClosureFromDynamicContext
(DynamicContext dynamicContext, ExceptionMetadata metadata) void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
setModuleDynamicContext
(DynamicContext dynamicModuleContext) toString()
void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.rumbledb.api.Item
addParentToDescendants, append, attributes, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, children, generateNativeQuery, getBinaryValue, getBooleanValue, getContent, getDateTimeValue, getDay, getDecimalValue, getDoubleValue, getDurationValue, getEpochMillis, getFloatValue, getHour, getIntegerValue, getIntValue, getItemAt, getItemByKey, getItems, getKeys, getMinute, getMonth, getMutabilityLevel, getNanosecond, getOffset, getPathIn, getPeriodValue, getSecond, getSize, getSparkSQLType, getSparkSQLValue, getSparkSQLValue, getStringValue, getTableLocation, getTextValue, getTimeValue, getTopLevelID, getTopLevelOrder, getValues, getVariantValue, getXmlDocumentPosition, getYear, hasDateTime, hasTimeZone, isAnyURI, isArray, isAttributeNode, isBase64Binary, isBinary, isBoolean, isDate, isDateTime, isDayTimeDuration, isDecimal, isDocumentNode, isDouble, isDuration, isElementNode, isFloat, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isInt, isInteger, isNaN, isNode, isNull, isNumeric, isObject, isPeriod, isString, isTextNode, isTime, isYearMonthDuration, nodeName, parent, physicalEquals, putItem, putItemAt, putItemByKey, putItemsAt, putLazyItemByKey, removeItemAt, removeItemByKey, serialize, serializeAsJSON, setMutabilityLevel, setParent, setPathIn, setTableLocation, setTopLevelID, setTopLevelOrder, setXmlDocumentPosition
-
Constructor Details
-
FunctionItem
protected FunctionItem() -
FunctionItem
public FunctionItem(FunctionIdentifier identifier, List<Name> parameterNames, FunctionSignature signature, DynamicContext dynamicModuleContext, RuntimeIterator bodyIterator) -
FunctionItem
public FunctionItem(FunctionIdentifier identifier, List<Name> parameterNames, FunctionSignature signature, DynamicContext dynamicModuleContext, RuntimeIterator bodyIterator, Map<Name, List<Item>> localVariablesInClosure, Map<Name, org.apache.spark.api.java.JavaRDD<Item>> RDDVariablesInClosure, Map<Name, JSoundDataFrame> DFVariablesInClosure) -
FunctionItem
public FunctionItem(Name name, Map<Name, SequenceType> paramNameToSequenceTypes, SequenceType returnType, DynamicContext dynamicModuleContext, RuntimeIterator bodyIterator, boolean isUpdating)
-
-
Method Details
-
getIdentifier
Description copied from interface:Item
Returns the identifier (name and arity) of the function, if it is a function item.- Specified by:
getIdentifier
in interfaceItem
- Returns:
- the function identifier.
-
getParameterNames
Description copied from interface:Item
Returns the names of the parameters of the function, if it is a function item.- Specified by:
getParameterNames
in interfaceItem
- Returns:
- the function parameter names.
-
getSignature
Description copied from interface:Item
Returns the signature of the function, if it is a function item.- Specified by:
getSignature
in interfaceItem
- Returns:
- the function signature.
-
getModuleDynamicContext
Description copied from interface:Item
Returns the module dynamic context, if it is a function item.- Specified by:
getModuleDynamicContext
in interfaceItem
- Returns:
- the function signature.
-
getBodyIterator
Description copied from interface:Item
Returns the body iterator, if it is a function item.- Specified by:
getBodyIterator
in interfaceItem
- Returns:
- the function signature.
-
getLocalVariablesInClosure
Description copied from interface:Item
Returns the local variable bindings, if it is a function item.- Specified by:
getLocalVariablesInClosure
in interfaceItem
- Returns:
- the function signature.
-
getRDDVariablesInClosure
Description copied from interface:Item
Returns the RDD variable bindings, if it is a function item.- Specified by:
getRDDVariablesInClosure
in interfaceItem
- Returns:
- the function signature.
-
getDFVariablesInClosure
Description copied from interface:Item
Returns the DataFrame variable bindings, if it is a function item.- Specified by:
getDFVariablesInClosure
in interfaceItem
- Returns:
- the function signature.
-
equals
Description copied from interface:Item
Tests for logical equality. The semantics are that of the eq operator. -
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:Item
Returns the effective boolean value of the item, if atomic.- Specified by:
getEffectiveBooleanValue
in interfaceItem
- Returns:
- the effective boolean value.
-
isAtomic
public boolean isAtomic()Description copied from interface:Item
Tests whether the item is an atomic item. -
isFunction
public boolean isFunction()Description copied from interface:Item
Tests whether the item is a function.- Specified by:
isFunction
in interfaceItem
- Returns:
- true if it is a function, false otherwise
-
toString
-
hashCode
public int hashCode()Description copied from interface:Item
Computes a hash code. -
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
getDynamicType
Description copied from interface:Item
Returns the dynamic type of the item (only for error message purposes).- Specified by:
getDynamicType
in interfaceItem
- Returns:
- the dynamic type as an item type.
-
deepCopy
-
populateClosureFromDynamicContext
public void populateClosureFromDynamicContext(DynamicContext dynamicContext, ExceptionMetadata metadata) -
isEstimator
public boolean isEstimator()- Specified by:
isEstimator
in interfaceItem
-
getEstimator
public org.apache.spark.ml.Estimator<?> getEstimator()- Specified by:
getEstimator
in interfaceItem
-
isTransformer
public boolean isTransformer()- Specified by:
isTransformer
in interfaceItem
-
getTransformer
public org.apache.spark.ml.Transformer getTransformer()- Specified by:
getTransformer
in interfaceItem
-
setModuleDynamicContext
-
atomizedValue
- Specified by:
atomizedValue
in interfaceItem
-