Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.4
    • 10.2.6
    • Optimizer - CTE
    • None
    • debian sid package on x64

    Description

      Dear all,

      I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

      MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

      I am giving it a try. I use the debian sid (x64) 10.2.4 version and already read some the bug reports filed recently about CTEs.

      I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

      So far, a lot of the tested models generate SQL that executes OK on MariaDB which is great!! However, I still have some issues with some complex models (>10 CTEs), I can provide a list.

      For example, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

      "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

      AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
      https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

      the SQL code is based on a table INPUT_DATA that can be defined this way :

      create table `INPUT_DATA` AS
      (
      select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
      )

      Your help is welcome.

      Sorry for the long message. I tried to give a full bug report with the most details.

      Thanks in advance

      Antoine

      Attachments

        Issue Links

          Activity

            AntoineC CARME Antoine created issue -
            AntoineC CARME Antoine made changes -
            Field Original Value New Value
            Description Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be allokup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that contain the columns cited here :

            SELECT `ADS`.`KEY` AS `KEY`, CASE WHEN (`ADS`.`Feature_3` <= 0.800000011920929) THEN 1 ELSE CASE WHEN (`ADS`.`Feature_3` <= 1.75) THEN CASE WHEN (`ADS`.`Feature_2` <= 4.449999809265137) THEN 4 ELSE 5 END ELSE CASE WHEN (`ADS`.`Feature_0` <= 6.350000381469727) THEN 7 ELSE 8 END END END AS node_id_2
            FROM `INPUT_DATA` AS `ADS`

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that contain the columns cited here :

            SELECT `ADS`.`KEY` AS `KEY`, CASE WHEN (`ADS`.`Feature_3` <= 0.800000011920929) THEN 1 ELSE CASE WHEN (`ADS`.`Feature_3` <= 1.75) THEN CASE WHEN (`ADS`.`Feature_2` <= 4.449999809265137) THEN 4 ELSE 5 END ELSE CASE WHEN (`ADS`.`Feature_0` <= 6.350000381469727) THEN 7 ELSE 8 END END END AS node_id_2
            FROM `INPUT_DATA` AS `ADS`

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            AntoineC CARME Antoine made changes -
            Description Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that contain the columns cited here :

            SELECT `ADS`.`KEY` AS `KEY`, CASE WHEN (`ADS`.`Feature_3` <= 0.800000011920929) THEN 1 ELSE CASE WHEN (`ADS`.`Feature_3` <= 1.75) THEN CASE WHEN (`ADS`.`Feature_2` <= 4.449999809265137) THEN 4 ELSE 5 END ELSE CASE WHEN (`ADS`.`Feature_0` <= 6.350000381469727) THEN 7 ELSE 8 END END END AS node_id_2
            FROM `INPUT_DATA` AS `ADS`

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as Feature_3
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            AntoineC CARME Antoine made changes -
            Description Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as Feature_3
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            serg Sergei Golubchik made changes -
            Affects Version/s 10.2.4 [ 22116 ]
            serg Sergei Golubchik made changes -
            Component/s Optimizer - CTE [ 13513 ]
            serg Sergei Golubchik made changes -
            Description Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :
            {code:sql}
            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )
            {code}
            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            AntoineC CARME Antoine made changes -
            Description Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian (x64) sid version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :
            {code:sql}
            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )
            {code}
            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian sid (x64) 10.2.4 version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            AntoineC CARME Antoine made changes -
            Description Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian sid (x64) 10.2.4 version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            I still have some issues with some models, I can provide a list. For the moment, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian sid (x64) 10.2.4 version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            So far, al lot of models generate SQL that executes OK on MariaDB which is great!! However, I still have some issues with some complex models (>10 CTEs), I can provide a list.

            For example, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            AntoineC CARME Antoine made changes -
            Description Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian sid (x64) 10.2.4 version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            So far, al lot of models generate SQL that executes OK on MariaDB which is great!! However, I still have some issues with some complex models (>10 CTEs), I can provide a list.

            For example, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            Dear all,

            I am currently working on a tool to translate machine learning models (built with scikit-learn python library) into a SQL code that can produce the model predictions when executed. The tool works by translating the model into a "sequence" of CTEs. It supports the main relational databases available on the market (sqlite, postgresql, MSSql, Oracle). Some demo is available here (https://github.com/antoinecarme/sklearn2sql-demo/) with sample SQL codes.

            MySQL used to not support CTEs. I see that MariaDB is adding support for CTEs and I will be glad to use it and help with examples. This is very good news!!!

            I am giving it a try. I use the debian sid (x64) 10.2.4 version and already read some the bug reports filed recently about CTEs.

            I use a set of automatic tests that run on all supported databases. I will only report when MariaDB is the only failing case.

            So far, a lot of the tested models generate SQL that executes OK on MariaDB which is great!! However, I still have some issues with some complex models (>10 CTEs), I can provide a list.

            For example, the AdaBoostClassifier models produce some SQL code that works on postgresql/oracle/MSSQL/SQlite but not on MariaDB. I get a message

            "Table \'db.AdaBoost_AVG_Scores\' doesn\'t exist"

            AdaBoost_AVG_Scores is a CTE defined in the query. It seems to be a lookup issue for CTEs. the SQL code is available here :
            https://github.com/antoinecarme/sklearn2sql-demo/blob/master/sample_outputs_round_4/AdaBoostClassifier/iris/mysql/demo1_AdaBoostClassifier_mysql.sql

            the SQL code is based on a table INPUT_DATA that can be defined this way :

            create table `INPUT_DATA` AS
            (
            select 1 as `KEY`, 0.0 as `Feature_0`, 1.0 as `Feature_1`, 2.0 as `Feature_2`, 3.0 as `Feature_3`
            )

            Your help is welcome.

            Sorry for the long message. I tried to give a full bug report with the most details.

            Thanks in advance

            Antoine
            AntoineC CARME Antoine made changes -
            Summary CTE not found in a compelx SQL code CTE not found in a complex SQL code
            cvicentiu Vicențiu Ciorbaru made changes -
            Assignee Igor Babaev [ igor ]
            igor Igor Babaev (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            igor Igor Babaev (Inactive) made changes -
            Fix Version/s 10.2.6 [ 22527 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            elenst Elena Stepanova made changes -
            gregja gregory jarrige made changes -
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 80235 ] MariaDB v4 [ 151916 ]

            People

              igor Igor Babaev (Inactive)
              AntoineC CARME Antoine
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.