joker-star-l commented on PR #39546: URL: https://github.com/apache/doris/pull/39546#issuecomment-2303913087
> > @superdiaodiao @yiguolei Hello, is this ...... > > Am I using it incorrectly? > > Actually, we have to add FE codes manually rather than generating it, since generating code was out of date and served as a temporary method before. Thank you. I add it manually. But when I did the e2e test, I got a strange error. (This error did not occur when I did unit test in the be) The agg function `linear_histogram` returns a json str. I got different double values in json with same query and data. The test case: ``` CREATE TABLE IF NOT EXISTS histogram_test ( a int ) ENGINE = OLAP DUPLICATE KEY(a) DISTRIBUTED BY HASH(a) BUCKETS AUTO PROPERTIES ( "replication_num" = "1" ) ; insert into histogram_test values (1); insert into histogram_test values (2); insert into histogram_test values (3); insert into histogram_test values (4); insert into histogram_test values (5); insert into histogram_test values (6); insert into histogram_test values (7); insert into histogram_test values (8); select linear_histogram(a, 2) from histogram_test; ``` The result of the first execution: ``` {"num_buckets":5,"buckets":[{"lower":4.6737435351163e-310,"upper":9.34748707015187e-310,"count":1,"acc_count":1},{"lower":9.34748707015187e-310,"upper":1.402123060518747e-309,"count":2,"acc_count":3},{"lower":1.402123060518747e-309,"upper":1.869497414022306e-309,"count":2,"acc_count":5},{"lower":1.869497414022306e-309,"upper":2.336871767525866e-309,"count":2,"acc_count":7},{"lower":2.336871767525866e-309,"upper":2.804246121029425e-309,"count":1,"acc_count":8}]} ``` The result of the second execution: ``` {"num_buckets":5,"buckets":[{"lower":9.399408234378048e218,"upper":3.8141098555780214e228,"count":1,"acc_count":1},{"lower":3.8141098555780214e228,"upper":7.628219710216102e228,"count":2,"acc_count":3},{"lower":7.628219710216102e228,"upper":1.1442329564854183e229,"count":2,"acc_count":5},{"lower":1.1442329564854183e229,"upper":1.5256439419492263e229,"count":2,"acc_count":7},{"lower":1.5256439419492263e229,"upper":1.9070549274130343e229,"count":1,"acc_count":8}]} ``` The result of the third execution: ``` {"num_buckets":5,"buckets":[{"lower":0.0,"upper":2.0,"count":1,"acc_count":1},{"lower":2.0,"upper":4.0,"count":2,"acc_count":3},{"lower":4.0,"upper":6.0,"count":2,"acc_count":5},{"lower":6.0,"upper":8.0,"count":2,"acc_count":7},{"lower":8.0,"upper":10.0,"count":1,"acc_count":8}]} ``` ... Only the result of the third execution is correct. I am very confused about this. Why this happens? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org