Hi everyone! I am writing the requirements document for four query functions 
and would like input from the community before the semantics are fixed.
  - INTEGRAL: the time-weighted integral of a time series over the query range. 
The current library UDF UDAFIntegral sums the trapezoid areas between adjacent 
points and takes a time unit parameter.
  - SAMPLE(N): returns N points sampled at random from the query result. The 
current built-in EQUAL_SIZE_BUCKET_RANDOM_SAMPLE samples per bucket by a 
proportion parameter; there is no function that takes N points from the whole 
result set.
  - DERIVATIVE: the rate of change per unit time. It is already a built-in UDTF 
(UDTFCommonDerivative); it divides the value difference by the time difference 
in milliseconds and has no unit parameter.
  - TZ: time zone handling in queries. There is no such function yet. We want 
to define how a query states a time zone and what it changes: the display of 
timestamps, the computation of day and week boundaries, or both.
  Has anyone worked on functions like these? Looking forward any suggestion.
  ---


  我正在编写四个查询函数的需求文档,希望在语义确定之前听取社区的意见。
  - INTEGRAL:时间序列在查询区间上的时间加权积分。现有的 library UDF UDAFIntegral 
累加相邻两点之间的梯形面积,并带一个时间单位参数。
  - SAMPLE(N):从查询结果中随机抽取 N 个点。现有的内置函数 EQUAL_SIZE_BUCKET_RANDOM_SAMPLE 按 
proportion 参数在每个桶内抽样;没有从整个结果集中抽取 N 个点的函数。
  - DERIVATIVE:单位时间的变化率。它已经是内置 UDTF(UDTFCommonDerivative);它用值差除以毫秒时间差,没有单位参数。
  - TZ:查询中的时区处理。目前没有这个函数。我们想定义查询如何指定时区,以及它改变什么:时间戳的显示、天和周边界的计算,或两者都改变。
  社区里有人做过类似的函数吗?想了解这些边界情况是如何定义的; 期待大家的建议


Best regards
Yaobin.Chen

Reply via email to