timeplus-io / proton-go-driver

Go driver for Timeplus Proton
https://timeplus.com
Apache License 2.0
4 stars 2 forks source link

Support function type for ML function and use cases #66

Open gangtao opened 9 months ago

gangtao commented 9 months ago

following SQL runs in proton client

WITH t AS
             (
               SELECT
                 1 AS p1, 2 AS p2, 3 AS target
             )
           SELECT
             stochastic_linear_regression_state( p1, p2, target, 0.1)
           FROM
             t;

WITH t AS
  (
    SELECT
      1 AS p1, 2 AS p2, 3 AS target
  )
SELECT
  stochastic_linear_regression_state(p1, p2, target, 0.1)
FROM
  t

Query id: be9d29ae-6523-4d78-8bcf-8156c0d212b0

┌─stochastic_linear_regression_state(p1, p2, target, 0.1)─┐
│ @@?@                                                    │
└─────────────────────────────────────────────────────────┘

1 row in set. Elapsed: 0.016 sec.

while it will report error in console UI through go driver.

proton: unsupported column type "aggregate_function(stochastic_linear_regression, uint8, uint8, uint8, float64)".

leo-cai-timeplus commented 8 months ago

https://github.com/timeplus-io/proton-go-driver/pull/67