embucket-labs icon indicating copy to clipboard operation
embucket-labs copied to clipboard

sql: Stacktrace returned when query executed

Open YaroslavLitvinov opened this issue 3 months ago • 2 comments

When following query is executed on Embucket, it returns stack trace of runtime error.

SELECT 
    t1.id,
    t1.name,
    t2.name AS name2,
    t3.name AS name3,
    t4.name AS name4,
    t5.name AS name5,
    t6.name AS name6,
    t7.name AS name7,
    t8.name AS name8,
    (
        SIN(COS(EXP(RANDOM() * 10))) +
        LOG(ABS(RANDOM() * 100) + 1) +
        SQRT(ABS(RANDOM() * 1000)) +
        TANH(SIN(RANDOM() * 10)) +
        SIN(COS(EXP(RANDOM() * 5))) +
        LOG(ABS(RANDOM() * 50) + 1) +
        SQRT(ABS(RANDOM() * 500)) +
        TANH(COS(RANDOM() * 5)) +
        SIN(COS(EXP(RANDOM() * 2))) +
        LOG(ABS(RANDOM() * 20) + 1) +
        SQRT(ABS(RANDOM() * 200)) +
        TANH(SIN(RANDOM() * 3)) +
        SIN(COS(EXP(RANDOM() * 8))) +
        LOG(ABS(RANDOM() * 80) + 1) +
        SQRT(ABS(RANDOM() * 800)) +
        TANH(COS(RANDOM() * 8))
    ) AS heavy_calc
FROM (VALUES 
        (1, 'Alice'),
        (2, 'Bob'),
        (3, 'Charlie'),
        (4, 'David')
) AS t1(id, name)
CROSS JOIN (VALUES (1,'Alice'),(2,'Bob'),(3,'Charlie'),(4,'David')) AS t2(id, name)
CROSS JOIN (VALUES (1,'Alice'),(2,'Bob'),(3,'Charlie'),(4,'David')) AS t3(id, name)
CROSS JOIN (VALUES (1,'Alice'),(2,'Bob'),(3,'Charlie'),(4,'David')) AS t4(id, name)
CROSS JOIN (VALUES (1,'Alice'),(2,'Bob'),(3,'Charlie'),(4,'David')) AS t5(id, name)
CROSS JOIN (VALUES (1,'Alice'),(2,'Bob'),(3,'Charlie'),(4,'David')) AS t6(id, name)
CROSS JOIN (VALUES (1,'Alice'),(2,'Bob'),(3,'Charlie'),(4,'David')) AS t7(id, name)
CROSS JOIN (VALUES (1,'Alice'),(2,'Bob'),(3,'Charlie'),(4,'David')) AS t8(id, name);

Error returned by snow sql is here: runtime_overflow.log

YaroslavLitvinov avatar Sep 21 '25 21:09 YaroslavLitvinov

@YaroslavLitvinov Did you run in --release mode? Without it, the debug info may be the cause of the issue itself (we had this problem with flatten). However, stack trace shouldn't be written out still.

DanCodedThis avatar Sep 23 '25 13:09 DanCodedThis

@YaroslavLitvinov Did you run in --release mode? Without it, the debug info may be the cause of the issue itself (we had this problem with flatten). However, stack trace shouldn't be written out still.

in release mode overflow checks disabled

YaroslavLitvinov avatar Sep 25 '25 19:09 YaroslavLitvinov