← Back to team overview

maria-developers team mailing list archive

MDEV-17399: JSON_TABLE: final input

 

Hi Alexey,

Please find below final bits of input.  After these are addressed the patch
will probably be good to push  (But I'll need a final pass before giving ok to
push).

== json_table_mysql* tests ==

* Please remove one of the json_table_mysql and json_table_mysql2 tests.
* Please move the remaining test to be in the same suite as json_table.test.

== Fix json_table.test ==

The test has this somewhere in the middle:

set optimizer_switch='firstmatch=off';

Please restore the original setting.

== ha_json_table::rnd_next() returns 0 on error ==

Consider this query:

select * from
json_table(
'[
  {"name": "X"},
  {"name2": "Y"}
]',
'$[*]' columns
(
  col1 varchar(100) path '$.name2' error on empty
)) as T;

The query produces an error. 
It happens like so:

* the call to ha_json_table::rnd_next() returns 0. 
* The SQL layer finds out about the error by checking thd->is_error() which returns true.

Please make ha_json_table::rnd_next() return an error.

== Rename table_function.* ==

Looking at the contets of sql/table_function.{h,cc}, one can see that there's
very little code there that is applicable to generic table function.  Almost
all code is specifi to JSON_TABLE. 
Because of that, please rename the files to e.g. json_table.{h,cc}.

BR
 Sergei
-- 
Sergei Petrunia, Software Developer
MariaDB Corporation | Skype: sergefp | Blog: http://petrunia.net




Follow ups