Class Meta.Frame

  • Enclosing interface:
    Meta

    public static class Meta.Frame
    extends java.lang.Object
    A collection of rows.
    • 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)
      • parseColumn

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

        static Common.TypedValue serializeScalar​(java.lang.Object element)
      • 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)