Bug 6702 - Recursive CTE support (WITH Clause)
Summary: Recursive CTE support (WITH Clause)
Status: NEW
Alias: None
Product: SQL
Classification: Unclassified
Component: all (show other bugs)
Version: 11.31.13 (Aug2018-SP2)
Hardware: All All
: Normal enhancement
Assignee: SQL devs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-26 13:16 CEST by Antoine.Carme@Laposte.net
Modified: 2019-05-04 11:47 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine.Carme@Laposte.net 2019-04-26 13:16:48 CEST
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Build Identifier: 

Hi,

I am working on a project translating mahien learning models in SQL. This project works well on the most used databases including MonteDB, of course.

https://github.com/antoinecarme/keras2sql

This issue here is to mention the absence of recursive CTE support in Monetdb (documented here : https://www.monetdb.org/Documentation/Manuals/SQLreference/SQLSyntaxOverview). I also found no issue in the bug tracker for this.

Recursive CTEs are useful to translate recurrent neural networks into SQL.

Some succesful usage of recursive CTEs is available here :

https://github.com/antoinecarme/keras2sql/issues/2

For a lot of databases, it is OK. Hive/Impala and MonetDB are missing.

I know this is not a very standard usage, but it does the job in a very elegant way (one unique SQL select statement for the whole neural network, tested).

Some code for postgresql :

https://github.com/antoinecarme/keras2sql/blob/master/demo/KerasClassifier_SimpleRNN/iris/pgsql/demo3_keras_KerasClassifier_SimpleRNN_pgsql.sql

The same for SQLite :

https://github.com/antoinecarme/keras2sql/blob/master/demo/KerasClassifier_SimpleRNN/iris/sqlite/demo3_keras_KerasClassifier_SimpleRNN_sqlite.sql

etc ...

Do you have plans to add this feature ?

Thanks in advance

Antoine


Reproducible: Always
Comment 1 Antoine.Carme@Laposte.net 2019-04-26 13:20:42 CEST
Pleas read "translating machine learning models in SQL."
Comment 2 Alex Ossipov 2019-05-04 08:51:00 CEST
This is the same requirement as described in the bug 3347.
Comment 3 Antoine.Carme@Laposte.net 2019-05-04 11:47:09 CEST
Alex,

Thanks a lot for your comment. 

Bug 3347 was originally about a "CREATE FUNCTION" clause.

What I need is a "WITH RECURSIVE" clause that you describe properly in the bug 3347, comment 3.

IMHO, these two features are to be kept separate as they require different fixes (at least at the SQL syntactic level).

Cheers,