Package org.rumbledb.items
Class ArrayItem
java.lang.Object
org.rumbledb.items.ArrayItem
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
,Serializable
,Item
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a value pair, if it is an array item.boolean
Tests for logical equality.Returns the dynamic type of the item (only for error message purposes).boolean
Returns the effective boolean value of the item, if atomic.getItemAt
(int i) Returns the member of the item at the specified position if it is an array.getItems()
Returns the members of the item if it is an array.int
Returns the mutability level of the item.Returns the path from the top level object of a DeltaFile for the item.int
getSize()
Returns the size of the item, if it is an array.Returns the SparkSQL type of the item for use in a query.Returns the SparkSQL value of the item for use in a query.getSparkSQLValue
(ItemType itemType) Returns the SparkSQL value of the item for use in a query.Returns the location of the DeltaFile for the item.long
Returns the top level ID of the item.Returns the Object containing the converted value of the item for a DataFrame.int
hashCode()
Computes a hash code.boolean
isArray()
Tests whether the item is an array.void
Appends an item, if it is an array.void
Add an item at index i, if it is an array.void
putItemsAt
(List<Item> values, int i) Add all items in items at index i, if it is an array.void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
removeItemAt
(int i) Remove the item at index i, if it is an array.void
setMutabilityLevel
(int mutabilityLevel) Sets the mutability level of the item to a supplied value.void
Sets the path from the top level object of a DeltaFile for the item to a supplied value.void
setTableLocation
(String location) Sets the location of the DeltaFile for the item to a supplied value.void
setTopLevelID
(long topLevelID) Sets the top level ID of the item to a supplied value.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, toString, wait, wait, wait
Methods inherited from interface org.rumbledb.api.Item
addParentToDescendants, attributes, castToDecimalValue, castToDoubleValue, castToFloatValue, castToIntegerValue, castToIntValue, children, generateNativeQuery, getBinaryValue, getBodyIterator, getBooleanValue, getContent, getDateTimeValue, getDay, getDecimalValue, getDFVariablesInClosure, getDoubleValue, getDurationValue, getEpochMillis, getEstimator, getFloatValue, getHour, getIdentifier, getIntegerValue, getIntValue, getItemByKey, getKeys, getLocalVariablesInClosure, getMinute, getModuleDynamicContext, getMonth, getNanosecond, getOffset, getParameterNames, getPeriodValue, getRDDVariablesInClosure, getSecond, getSignature, getStringValue, getTextValue, getTimeValue, getTopLevelOrder, getTransformer, getValues, getXmlDocumentPosition, getYear, hasDateTime, hasTimeZone, isAnyURI, isAtomic, isAttributeNode, isBase64Binary, isBinary, isBoolean, isDate, isDateTime, isDayTimeDuration, isDecimal, isDocumentNode, isDouble, isDuration, isElementNode, isEstimator, isFloat, isFunction, isGDay, isGMonth, isGMonthDay, isGYear, isGYearMonth, isHexBinary, isInt, isInteger, isNaN, isNode, isNull, isNumeric, isObject, isPeriod, isString, isTextNode, isTime, isTransformer, isYearMonthDuration, nodeName, parent, physicalEquals, putItemByKey, putLazyItemByKey, removeItemByKey, serialize, serializeAsJSON, setParent, setTopLevelOrder, setXmlDocumentPosition
-
Constructor Details
-
ArrayItem
public ArrayItem() -
ArrayItem
-
-
Method Details
-
equals
Description copied from interface:Item
Tests for logical equality. The semantics are that of the eq operator. -
append
Description copied from interface:Item
Adds a value pair, if it is an array item. -
getItems
Description copied from interface:Item
Returns the members of the item if it is an array. -
getItemAt
Description copied from interface:Item
Returns the member of the item at the specified position if it is an array. -
putItem
Description copied from interface:Item
Appends an item, if it is an array. -
putItemAt
Description copied from interface:Item
Add an item at index i, if it is an array. -
putItemsAt
Description copied from interface:Item
Add all items in items at index i, if it is an array.- Specified by:
putItemsAt
in interfaceItem
- Parameters:
values
- a list of items.i
- an integer.
-
removeItemAt
public void removeItemAt(int i) Description copied from interface:Item
Remove the item at index i, if it is an array.- Specified by:
removeItemAt
in interfaceItem
- Parameters:
i
- an integer.
-
isArray
public boolean isArray()Description copied from interface:Item
Tests whether the item is an array. -
getSize
public int getSize()Description copied from interface:Item
Returns the size of the item, if it is an array. -
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
-
hashCode
public int hashCode()Description copied from interface:Item
Computes a hash code. -
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.
-
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.
-
getMutabilityLevel
public int getMutabilityLevel()Description copied from interface:Item
Returns the mutability level of the item.- Specified by:
getMutabilityLevel
in interfaceItem
- Returns:
- an int representing nestedness of the item inside transform expressions.
-
setMutabilityLevel
public void setMutabilityLevel(int mutabilityLevel) Description copied from interface:Item
Sets the mutability level of the item to a supplied value.- Specified by:
setMutabilityLevel
in interfaceItem
- Parameters:
mutabilityLevel
- new mutability level.
-
getTopLevelID
public long getTopLevelID()Description copied from interface:Item
Returns the top level ID of the item.- Specified by:
getTopLevelID
in interfaceItem
- Returns:
- int representing the rowID of the item within a DeltaFile.
-
setTopLevelID
public void setTopLevelID(long topLevelID) Description copied from interface:Item
Sets the top level ID of the item to a supplied value.- Specified by:
setTopLevelID
in interfaceItem
- Parameters:
topLevelID
- new top level ID.
-
getPathIn
Description copied from interface:Item
Returns the path from the top level object of a DeltaFile for the item. -
setPathIn
Description copied from interface:Item
Sets the path from the top level object of a DeltaFile for the item to a supplied value. -
getTableLocation
Description copied from interface:Item
Returns the location of the DeltaFile for the item.- Specified by:
getTableLocation
in interfaceItem
- Returns:
- String representing the location of the DeltaFile for the item.
-
setTableLocation
Description copied from interface:Item
Sets the location of the DeltaFile for the item to a supplied value.- Specified by:
setTableLocation
in interfaceItem
- Parameters:
location
- new location of the DeltaFile for the item.
-
getSparkSQLValue
Description copied from interface:Item
Returns the SparkSQL value of the item for use in a query.- Specified by:
getSparkSQLValue
in interfaceItem
- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLValue
Description copied from interface:Item
Returns the SparkSQL value of the item for use in a query.- Specified by:
getSparkSQLValue
in interfaceItem
- Returns:
- String representing the SparkSQL value of the item.
-
getSparkSQLType
Description copied from interface:Item
Returns the SparkSQL type of the item for use in a query.- Specified by:
getSparkSQLType
in interfaceItem
- Returns:
- String representing the SparkSQL type of the item.
-
atomizedValue
- Specified by:
atomizedValue
in interfaceItem
-
getVariantValue
Description copied from interface:Item
Returns the Object containing the converted value of the item for a DataFrame. For use to build Variant columns.- Specified by:
getVariantValue
in interfaceItem
- Returns:
- Object representing the converted value of the item.
-