Constructor
new AttributeGroup(name, attrs)
Parameters:
Name | Type | Description |
---|---|---|
name |
string | name of the attribute group |
attrs |
Array.<Attribute> | array of attributes. Attributes will be copied with their corresponding indices in the array. |
Methods
(static) fromStructField(field) → {module:eclairjs/ml/attribute.AttributeGroup}
Creates an attribute group from a StructField instance.
Parameters:
Name | Type | Description |
---|---|---|
field |
module:eclairjs/sql/types.StructField |
Returns:
applywithnumber(attrIndex) → {module:eclairjs/sql/catalyst/expressions.Attribute}
Gets an attribute by its index.
Parameters:
Name | Type | Description |
---|---|---|
attrIndex |
number |
Returns:
- Type
- module:eclairjs/sql/catalyst/expressions.Attribute
applywithstring(attrName) → {module:eclairjs/sql/catalyst/expressions.Attribute}
Gets an attribute by its name.
Parameters:
Name | Type | Description |
---|---|---|
attrName |
string |
Returns:
- Type
- module:eclairjs/sql/catalyst/expressions.Attribute
getAttrwithnumber(attrIndex) → {module:eclairjs/sql/catalyst/expressions.Attribute}
Gets an attribute by its index.
Parameters:
Name | Type | Description |
---|---|---|
attrIndex |
number |
Returns:
- Type
- module:eclairjs/sql/catalyst/expressions.Attribute
getAttrwithstring(attrName) → {module:eclairjs/sql/catalyst/expressions.Attribute}
Gets an attribute by its name.
Parameters:
Name | Type | Description |
---|---|---|
attrName |
string |
Returns:
- Type
- module:eclairjs/sql/catalyst/expressions.Attribute
hasAttr(attrName) → {boolean}
Test whether this attribute group contains a specific attribute.
Parameters:
Name | Type | Description |
---|---|---|
attrName |
string |
Returns:
- Type
- boolean
indexOf(attrName) → {number}
Index of an attribute specified by name.
Parameters:
Name | Type | Description |
---|---|---|
attrName |
string |
Returns:
- Type
- number
size() → {number}
Size of the attribute group. Returns -1 if the size is unknown.
Returns:
- Type
- number
toMetadata(existingMetadataopt) → {module:eclairjs/sql/types.Metadata}
Converts to ML metadata with some existing metadata.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
existingMetadata |
module:eclairjs/sql/types.Metadata |
<optional> |
Returns:
toStructField(existingMetadataopt) → {module:eclairjs/sql/types.StructField}
Converts to a StructField with some existing metadata.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
existingMetadata |
module:eclairjs/sql/types.Metadata |
<optional> |