SELECT DISTINCT
Batch Streaming
If SELECT DISTINCT is specified, all duplicate rows are removed from the result set (one row is kept from each group of duplicates).
如果指定了SELECT DISTINCT,则将从结果集中删除所有重复行(每组重复行中保留一行)。
SELECT DISTINCT id FROM Orders
For streaming queries, the required state for computing the query result might grow infinitely. State size depends on number of distinct rows. You can provide a query configuration with an appropriate state time-to-live (TTL) to prevent excessive state size. Note that this might affect the correctness of the query result. See query configuration for details
对于流式查询,计算查询结果所需的状态可能会无限增长。状态大小取决于不同行的数量。您可以为查询配置提供适当的状态生存时间(TTL),以防止状态大小过大。请注意,这可能会影响查询结果的正确性。有关详细信息,请参阅查询配置