Skip to content

Commit

Permalink
Improve SetDigest serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Jan 7, 2025
1 parent 9e0ff60 commit 917f687
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public final class ClientStandardTypes
public static final String HYPER_LOG_LOG = "HyperLogLog";
public static final String QDIGEST = "qdigest";
public static final String TDIGEST = "tdigest";
public static final String SET_DIGEST = "SetDigest";
public static final String P4_HYPER_LOG_LOG = "P4HyperLogLog";
public static final String INTERVAL_DAY_TO_SECOND = "interval day to second";
public static final String INTERVAL_YEAR_TO_MONTH = "interval year to month";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import static io.trino.client.ClientStandardTypes.QDIGEST;
import static io.trino.client.ClientStandardTypes.REAL;
import static io.trino.client.ClientStandardTypes.ROW;
import static io.trino.client.ClientStandardTypes.SET_DIGEST;
import static io.trino.client.ClientStandardTypes.SMALLINT;
import static io.trino.client.ClientStandardTypes.SPHERICAL_GEOGRAPHY;
import static io.trino.client.ClientStandardTypes.TIME;
Expand Down Expand Up @@ -142,6 +143,7 @@ private static TypeDecoder createTypeDecoder(ClientTypeSignature signature)
case QDIGEST:
case P4_HYPER_LOG_LOG:
case HYPER_LOG_LOG:
case SET_DIGEST:
case VARBINARY:
default:
return BASE_64_DECODER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.trino.spi.connector.ConnectorSession;
import io.trino.spi.type.AbstractVariableWidthType;
import io.trino.spi.type.SqlVarbinary;
import io.trino.spi.type.StandardTypes;
import io.trino.spi.type.TypeSignature;

// Layout is <size>:<digest>, where
Expand All @@ -31,7 +32,7 @@ public class SetDigestType
extends AbstractVariableWidthType
{
public static final SetDigestType SET_DIGEST = new SetDigestType();
public static final String NAME = "SetDigest";
public static final String NAME = StandardTypes.SET_DIGEST;

private SetDigestType()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public final class StandardTypes
public static final String HYPER_LOG_LOG = "HyperLogLog";
public static final String QDIGEST = "qdigest";
public static final String TDIGEST = "tdigest";
public static final String SET_DIGEST = "SetDigest";
public static final String P4_HYPER_LOG_LOG = "P4HyperLogLog";
public static final String INTERVAL_DAY_TO_SECOND = "interval day to second";
public static final String INTERVAL_YEAR_TO_MONTH = "interval year to month";
Expand Down

0 comments on commit 917f687

Please sign in to comment.