Package org.apache.calcite.avatica

## Class Meta.Frame

- java.lang.Object
- - org.apache.calcite.avatica.Meta.Frame

Enclosing interface:
  Meta

    public static class Meta.Frame
    extends java.lang.Object

A collection of rows.

### Field Summary

Fields
`boolean` `done` Whether this is definitely the last frame of rows.
`static Meta.Frame` `EMPTY` Frame that has zero rows and is the last frame.
`private static com.google.protobuf.Descriptors.FieldDescriptor` `HAS_ARRAY_VALUE_DESCRIPTOR`
`static Meta.Frame` `MORE` Frame that has zero rows but may have another frame.
`long` `offset` Zero-based offset of first row.
`java.lang.Iterable<java.lang.Object>` `rows` The rows.
`private static com.google.protobuf.Descriptors.FieldDescriptor` `SCALAR_VALUE_DESCRIPTOR`

### Constructor Summary

Constructors
`Frame​(long offset, boolean done, java.lang.Iterable<java.lang.Object> rows)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static Meta.Frame` `create​(long offset, boolean done, java.util.List<java.lang.Object> rows)`
`(package private) static java.lang.Object` `deserializeScalarValue​(Common.TypedValue protoElement)`
`private static boolean` `equalRows​(java.lang.Iterable<java.lang.Object> rows, java.lang.Iterable<java.lang.Object> otherRows)`
`boolean` `equals​(java.lang.Object o)`
`static Meta.Frame` `fromProto​(Common.Frame proto)`
`int` `hashCode()`
`(package private) static boolean` `isNewStyleColumn​(Common.ColumnValue column)` Determines whether this message contains the new attributes in the message.
`(package private) static java.lang.Object` `parseArray​(Common.TypedValue array)` Recursively parses a TypedValue while it is an array.
`(package private) static java.lang.Object` `parseColumn​(Common.ColumnValue column)` Parses the value for a ColumnValue using the separated array and scalar attributes.
`(package private) static void` `parseColumn​(Common.Row.Builder rowBuilder, java.lang.Object column)`
`(package private) static java.lang.Object` `parseOldStyleColumn​(Common.ColumnValue column)` For Calcite 1.5, we made the mistake of using array length to determine when the value for a column is a scalar or an array.
`(package private) static Common.TypedValue` `serializeScalar​(java.lang.Object element)`
`Common.Frame` `toProto()`
`(package private) static void` `validateColumnValue​(Common.ColumnValue column)` Verifies that a ColumnValue has only a scalar or array value, not both and not neither.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### HAS_ARRAY_VALUE_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor HAS_ARRAY_VALUE_DESCRIPTOR

#### SCALAR_VALUE_DESCRIPTOR

    private static final com.google.protobuf.Descriptors.FieldDescriptor SCALAR_VALUE_DESCRIPTOR

#### EMPTY

    public static final Meta.Frame EMPTY

Frame that has zero rows and is the last frame.

#### MORE

    public static final Meta.Frame MORE

Frame that has zero rows but may have another frame.

#### offset

    public final long offset

Zero-based offset of first row.

#### done

    public final boolean done

Whether this is definitely the last frame of rows. If true, there are no more rows. If false, there may or may not be more rows.

#### rows

    public final java.lang.Iterable<java.lang.Object> rows

The rows.

### Constructor Detail

#### Frame

    public Frame​(long offset,
                 boolean done,
                 java.lang.Iterable<java.lang.Object> rows)

### Method Detail

#### create

    public static Meta.Frame create​(long offset,
                                    boolean done,
                                    java.util.List<java.lang.Object> rows)

#### toProto

    public Common.Frame toProto()

#### parseColumn

    static void parseColumn​(Common.Row.Builder rowBuilder,
                            java.lang.Object column)

#### serializeScalar

    static Common.TypedValue serializeScalar​(java.lang.Object element)

#### fromProto

    public static Meta.Frame fromProto​(Common.Frame proto)

#### isNewStyleColumn

    static boolean isNewStyleColumn​(Common.ColumnValue column)

Determines whether this message contains the new attributes in the message. We can't directly test for the negative because our `hasField` trick does not work on repeated fields.

Parameters:
  `column` - The protobuf column object
Returns:
  True if the message is the new style, false otherwise.

#### parseOldStyleColumn

    static java.lang.Object parseOldStyleColumn​(Common.ColumnValue column)

For Calcite 1.5, we made the mistake of using array length to determine when the value for a column is a scalar or an array. This method performs the old parsing for backwards compatibility.

Parameters:
  `column` - The protobuf ColumnValue object
Returns:
  The parsed value for this column

#### parseColumn

    static java.lang.Object parseColumn​(Common.ColumnValue column)

Parses the value for a ColumnValue using the separated array and scalar attributes.

Parameters:
  `column` - The protobuf ColumnValue object
Returns:
  The parse value for this column

#### parseArray

    static java.lang.Object parseArray​(Common.TypedValue array)

Recursively parses a TypedValue while it is an array.

#### validateColumnValue

    static void validateColumnValue​(Common.ColumnValue column)

Verifies that a ColumnValue has only a scalar or array value, not both and not neither.

Parameters:
  `column` - The protobuf ColumnValue object
Throws:
  `java.lang.IllegalArgumentException` - When the above condition is not met

#### deserializeScalarValue

    static java.lang.Object deserializeScalarValue​(Common.TypedValue protoElement)

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### equals

    public boolean equals​(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### equalRows

    private static boolean equalRows​(java.lang.Iterable<java.lang.Object> rows,
                                     java.lang.Iterable<java.lang.Object> otherRows)