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
ConstructorsModifierConstructorDescriptionprotectedFunctionItem(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()booleanTests 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).booleanReturns 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.TransformerinthashCode()Computes a hash code.booleanisAtomic()Tests whether the item is an atomic item.booleanbooleanTests whether the item is a function.booleanvoidpopulateClosureFromDynamicContext(DynamicContext dynamicContext, ExceptionMetadata metadata) voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidsetModuleDynamicContext(DynamicContext dynamicModuleContext) toString()voidwrite(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, waitMethods 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:ItemReturns the identifier (name and arity) of the function, if it is a function item.- Specified by:
getIdentifierin interfaceItem- Returns:
- the function identifier.
-
getParameterNames
Description copied from interface:ItemReturns the names of the parameters of the function, if it is a function item.- Specified by:
getParameterNamesin interfaceItem- Returns:
- the function parameter names.
-
getSignature
Description copied from interface:ItemReturns the signature of the function, if it is a function item.- Specified by:
getSignaturein interfaceItem- Returns:
- the function signature.
-
getModuleDynamicContext
Description copied from interface:ItemReturns the module dynamic context, if it is a function item.- Specified by:
getModuleDynamicContextin interfaceItem- Returns:
- the function signature.
-
getBodyIterator
Description copied from interface:ItemReturns the body iterator, if it is a function item.- Specified by:
getBodyIteratorin interfaceItem- Returns:
- the function signature.
-
getLocalVariablesInClosure
Description copied from interface:ItemReturns the local variable bindings, if it is a function item.- Specified by:
getLocalVariablesInClosurein interfaceItem- Returns:
- the function signature.
-
getRDDVariablesInClosure
Description copied from interface:ItemReturns the RDD variable bindings, if it is a function item.- Specified by:
getRDDVariablesInClosurein interfaceItem- Returns:
- the function signature.
-
getDFVariablesInClosure
Description copied from interface:ItemReturns the DataFrame variable bindings, if it is a function item.- Specified by:
getDFVariablesInClosurein interfaceItem- Returns:
- the function signature.
-
equals
Description copied from interface:ItemTests for logical equality. The semantics are that of the eq operator. -
getEffectiveBooleanValue
public boolean getEffectiveBooleanValue()Description copied from interface:ItemReturns the effective boolean value of the item, if atomic.- Specified by:
getEffectiveBooleanValuein interfaceItem- Returns:
- the effective boolean value.
-
isAtomic
public boolean isAtomic()Description copied from interface:ItemTests whether the item is an atomic item. -
isFunction
public boolean isFunction()Description copied from interface:ItemTests whether the item is a function.- Specified by:
isFunctionin interfaceItem- Returns:
- true if it is a function, false otherwise
-
toString
-
hashCode
public int hashCode()Description copied from interface:ItemComputes a hash code. -
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin interfacecom.esotericsoftware.kryo.KryoSerializable
-
getDynamicType
Description copied from interface:ItemReturns the dynamic type of the item (only for error message purposes).- Specified by:
getDynamicTypein interfaceItem- Returns:
- the dynamic type as an item type.
-
deepCopy
-
populateClosureFromDynamicContext
public void populateClosureFromDynamicContext(DynamicContext dynamicContext, ExceptionMetadata metadata) -
isEstimator
public boolean isEstimator()- Specified by:
isEstimatorin interfaceItem
-
getEstimator
public org.apache.spark.ml.Estimator<?> getEstimator()- Specified by:
getEstimatorin interfaceItem
-
isTransformer
public boolean isTransformer()- Specified by:
isTransformerin interfaceItem
-
getTransformer
public org.apache.spark.ml.Transformer getTransformer()- Specified by:
getTransformerin interfaceItem
-
setModuleDynamicContext
-
atomizedValue
- Specified by:
atomizedValuein interfaceItem
-