Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime 15.2 and above
Returns value compressed with Zstandard compression.
Syntax
zstd_compress ( value [, level [, streaming_mode ] ] )
Arguments
value: The binary value to compress.level: Optional integer argument between 1 and 22 that represents the compression level. The default is 3.streaming_mode: Optional boolean argument that indicates whether to use streaming mode.
Returns
Compressed value of type BINARY.
Examples
> SELECT base64(zstd_compress(repeat("Apache Spark ", 10)));
KLUv/SCCpQAAaEFwYWNoZSBTcGFyayABABLS+QU=
> SELECT string(zstd_decompress(zstd_compress("Apache Spark")));
Apache Spark
-- Using streaming mode
> SELECT base64(zstd_compress(repeat("Apache Spark ", 10), 3, true));
KLUv/QBYpAAAaEFwYWNoZSBTcGFyayABABLS+QUBAAA=