evaluate 运算符插件evaluate operator plugins

调用服务端查询扩展(插件)。Invokes a service-side query extension (plugin).

evaluate 运算符是一个表格运算符,它提供了调用查询语言扩展(称为插件)的功能。The evaluate operator is a tabular operator that provides the ability to invoke query language extensions known as plugins. 插件可以启用或禁用(与始终可用的其他语言构造不同),并且不受语言的关系特性“约束”(例如,它们可能没有预定义的、静态确定的输出架构)。Plugins can be enabled or disabled (unlike other language constructs, which are always available), and aren't "bound" by the relational nature of the language (for example, they may not have a predefined, statically determined, output schema).


[T |] evaluate [ evaluateParameters ] PluginName ( [PluginArg1 [, PluginArg2]... )[T |] evaluate [ evaluateParameters ] PluginName ( [PluginArg1 [, PluginArg2]... )


  • T 是插件的可选表格输入。T is an optional tabular input to the plugin. (某些插件不接受任何输入,而充当表格数据源。)(Some plugins don't take any input, and act as a tabular data source.)
  • PluginName 是调用的插件的名称,为必需项。PluginName is the mandatory name of the plugin being invoked.
  • PluginArg1, ... 是插件的可选参数。PluginArg1, ... are the optional arguments to the plugin.
  • evaluateParameters:零个或零个以上(以空格分隔)以 Name = Value 形式表示的参数,用于控制评估操作和执行计划的行为 。evaluateParameters: Zero or more (space-separated) parameters in the form of Name = Value that control the behavior of the evaluate operation and execution plan. 每个插件可能会以不同方式确定如何处理每个参数。Each plugin may decide differently how to handle each parameter. 有关具体行为,请参阅每个插件的文档。Refer to each plugin's documentation for specific behavior.

支持以下参数:The following parameters are supported:

名称Name Values 说明Description
hint.distribution single, per_node, per_shardsingle, per_node, per_shard 分布提示Distribution hints
hint.pass_filters true, falsetrue, false 允许 evaluate 运算符在插件之前传递任何匹配筛选器。Allow evaluate operator to passthrough any matching filters before the plugin. 如果筛选器引用存在于 evaluate 运算符之前的列,则认为它是“匹配的”。Filter is considered as 'matched' if it refers to a column existing before the evaluate operator. 默认:falseDefault: false
hint.pass_filters_column column_namecolumn_name 允许插件运算符传递筛选器来引用插件前的 column_name。Allow plugin operator to passthrough filters referring to column_name before the plugin. 参数可多次用于不同的列名称。Parameter can be used multiple times with different column names.


  • 从语法上讲,evaluate 的行为类似于 invoke 运算符,后者可调用表格函数。Syntactically, evaluate behaves similarly to the invoke operator, which invokes tabular functions.
  • 通过 evaluate 运算符提供的插件不受查询执行或参数评估的常规规则约束。Plugins provided through the evaluate operator aren't bound by the regular rules of query execution or argument evaluation.
  • 特定插件可能有特定的限制。Specific plugins may have specific restrictions. 例如,在执行跨群集查询时,不能使用输出架构依赖于数据的插件(例如 bag_unpack 插件pivot 插件)。For example, plugins whose output schema depends on the data (for example, bag_unpack plugin and pivot plugin) can't be used when performing cross-cluster queries.

分布提示 Distribution hints

分布提示指定如何在多个群集节点之间分布插件执行。Distribution hints specify how the plugin execution will be distributed across multiple cluster nodes. 每个插件可能会针对分布提供不同的支持。Each plugin may implement a different support for the distribution. 插件的文档指定了插件支持的分布选项。The plugin's documentation specifies the distribution options supported by the plugin.

可能的值:Possible values:

  • single:插件的单个实例将针对整个查询数据运行。single: A single instance of the plugin will run over the entire query data.
  • per_node:如果在插件调用之前的查询分布在节点之间,则会在每个节点上针对其包含的数据运行插件的一个实例。per_node: If the query before the plugin call is distributed across nodes, then an instance of the plugin will run on each node over the data that it contains.
  • per_shard:如果在插件调用之前的数据分布在分片之间,则会针对数据的每个分片运行插件的一个实例。per_shard: If the data before the plugin call is distributed across shards, then an instance of the plugin will run over each shard of the data.