Class TrinoThriftJson

java.lang.Object
io.trino.plugin.thrift.api.datatypes.TrinoThriftJson
All Implemented Interfaces:
TrinoThriftColumnData

@ThriftStruct public final class TrinoThriftJson extends Object implements TrinoThriftColumnData
Elements of nulls array determine if a value for a corresponding row is null. Each elements of sizes array contains the length in bytes for the corresponding element. If row is null then the corresponding element in sizes is ignored. bytes array contains UTF-8 encoded byte values for string representation of json. Values for all rows are written to bytes array one after another. The total number of bytes must be equal to the sum of all sizes.
  • Constructor Details

    • TrinoThriftJson

      @ThriftConstructor public TrinoThriftJson(@ThriftField(name="nulls") @Nullable boolean[] nulls, @ThriftField(name="sizes") @Nullable int[] sizes, @ThriftField(name="bytes") @Nullable byte[] bytes)
  • Method Details

    • getNulls

      @Nullable @ThriftField(value=1, requiredness=OPTIONAL) public boolean[] getNulls()
    • getSizes

      @Nullable @ThriftField(value=2, requiredness=OPTIONAL) public int[] getSizes()
    • getBytes

      @Nullable @ThriftField(value=3, requiredness=OPTIONAL) public byte[] getBytes()
    • toBlock

      public Block toBlock(Type desiredType)
      Specified by:
      toBlock in interface TrinoThriftColumnData
    • numberOfRecords

      public int numberOfRecords()
      Specified by:
      numberOfRecords in interface TrinoThriftColumnData
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromBlock

      public static TrinoThriftBlock fromBlock(Block block, Type type)