User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Build Identifier:
The code below crashes, it seems to be caused by using 'with' in combination with a table returning function.
Reproducible: Always
Steps to Reproduce:
-- Run the following code, make sure python UDFs are enabled:
-- Create input table
CREATE TABLE test_table(x STRING, y STRING, z STRING);
INSERT INTO test_table VALUES ('test value 1', 'test value 2', 'test value 3');
-- Create test function
CREATE FUNCTION test_function(x STRING, y STRING, z STRING) RETURNS TABLE(a STRING, b STRING, c FLOAT) LANGUAGE PYTHON {
result = dict()
result['a'] = ['test value a']
result['b'] = ['test value b']
result['c'] = [3]
return result
};
-- Failing query
CREATE TABLE results_table AS (
WITH test_table_tmp AS (
SELECT * FROM test_table
)
SELECT * FROM test_function(test_table_tmp.x, test_table_tmp.y, test_table_tmp.z)
);
SELECT * FROM results_table;
Actual Results:
MonetDB crashes on linux and hangs on a mac.
Expected Results:
+--------------+--------------+--------------------------+
| a | b | c |
+==============+==============+==========================+
| test value a | test value b | 3 |
+--------------+--------------+--------------------------+
1 tuple (1.324ms)
A possible workaround for this would be to change the query to:
CREATE TABLE results_table AS (
SELECT * FROM test_function( (select x, y, z FROM test_table ) )
);
This query does work and returns the correct results. The failing query should be equivalent however.
Date: 2017-10-24 14:37:02 +0200
From: @rkoopmanschap
To: SQL devs <>
Version: 11.27.5 (Jul2017-SP1)
CC: @njnes
Last updated: 2017-12-14 14:46:04 +0100
Comment 25784
Date: 2017-10-24 14:37:02 +0200
From: @rkoopmanschap
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Build Identifier:
The code below crashes, it seems to be caused by using 'with' in combination with a table returning function.
Reproducible: Always
Steps to Reproduce:
-- Run the following code, make sure python UDFs are enabled:
-- Create input table
CREATE TABLE test_table(x STRING, y STRING, z STRING);
INSERT INTO test_table VALUES ('test value 1', 'test value 2', 'test value 3');
-- Create test function
CREATE FUNCTION test_function(x STRING, y STRING, z STRING) RETURNS TABLE(a STRING, b STRING, c FLOAT) LANGUAGE PYTHON {
result = dict()
result['a'] = ['test value a']
result['b'] = ['test value b']
result['c'] = [3]
};
-- Failing query
CREATE TABLE results_table AS (
WITH test_table_tmp AS (
SELECT * FROM test_table
)
SELECT * FROM test_function(test_table_tmp.x, test_table_tmp.y, test_table_tmp.z)
);
SELECT * FROM results_table;
Actual Results:
MonetDB crashes on linux and hangs on a mac.
Expected Results:
+--------------+--------------+--------------------------+
| a | b | c |
+==============+==============+==========================+
| test value a | test value b | 3 |
+--------------+--------------+--------------------------+
1 tuple (1.324ms)
A possible workaround for this would be to change the query to:
CREATE TABLE results_table AS (
SELECT * FROM test_function( (select x, y, z FROM test_table ) )
);
This query does work and returns the correct results. The failing query should be equivalent however.
Comment 25799
Date: 2017-10-25 11:24:14 +0200
From: MonetDB Mercurial Repository <>
Changeset 813fd7d13da9 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=813fd7d13da9
Changeset description:
Comment 25800
Date: 2017-10-25 11:25:21 +0200
From: @njnes
fixed crash, so we now get an error. But the 2 queries are not equivalent
Comment 25803
Date: 2017-10-26 07:56:36 +0200
From: MonetDB Mercurial Repository <>
Changeset 5e59ce515a5b made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=5e59ce515a5b
Changeset description:
Comment 25808
Date: 2017-10-26 14:21:34 +0200
From: MonetDB Mercurial Repository <>
Changeset d245a7b07594 made by Richard Koopmanschap richard.koopmanschap@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=d245a7b07594
Changeset description:
Comment 25810
Date: 2017-10-26 15:41:08 +0200
From: MonetDB Mercurial Repository <>
Changeset 96ff384f1c07 made by Richard Koopmanschap richard.koopmanschap@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=96ff384f1c07
Changeset description:
The text was updated successfully, but these errors were encountered: