mirror of
https://github.com/tstack/lnav.git
synced 2024-08-16 16:30:25 +03:00
[sql/json] json_group_array() returns {} instead of []
This commit is contained in:
parent
116b40f28c
commit
b536043050
@ -744,7 +744,7 @@ sql_json_group_array_final(sqlite3_context* context)
|
||||
= (json_agg_context*) sqlite3_aggregate_context(context, 0);
|
||||
|
||||
if (jac == nullptr) {
|
||||
sqlite3_result_text(context, "{}", -1, SQLITE_STATIC);
|
||||
sqlite3_result_text(context, "[]", -1, SQLITE_STATIC);
|
||||
} else {
|
||||
const unsigned char* buf;
|
||||
size_t len;
|
||||
|
@ -295,7 +295,7 @@ textfile_sub_source::text_crumbs_for_line(
|
||||
auto lf = this->current_file();
|
||||
crumbs.emplace_back(
|
||||
lf->get_unique_path(),
|
||||
attr_line_t().append(lnav::roles::identifier(lf->get_unique_path())),
|
||||
attr_line_t().append(lf->get_unique_path()),
|
||||
[this]() {
|
||||
return this->tss_files | lnav::itertools::map([](const auto& lf) {
|
||||
return breadcrumb::possibility{
|
||||
|
@ -688,6 +688,8 @@ EXPECTED_FILES = \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_98ce02dff32d955466524bb167fa45fdf8591788.out \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_9ab4f51486d7cc99c584721bf0e50c223dac4f18.err \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_9ab4f51486d7cc99c584721bf0e50c223dac4f18.out \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_9d260ed24b28579ef1dbed25b10c42741e52b023.err \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_9d260ed24b28579ef1dbed25b10c42741e52b023.out \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_9fbfe3c93467666c45b643f3b8ba990a294c17ff.err \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_9fbfe3c93467666c45b643f3b8ba990a294c17ff.out \
|
||||
$(srcdir)/%reldir%/test_sql_json_func.sh_a4ffc64f89cf9917fbc918227fd3c05e54d9e8b5.err \
|
||||
|
@ -0,0 +1,2 @@
|
||||
Row 0:
|
||||
Column json_group_array(column1): []
|
@ -128,3 +128,5 @@ EOF
|
||||
)
|
||||
|
||||
run_cap_test ./drive_sql "$GROUP_ARRAY_SELECT_2"
|
||||
|
||||
run_cap_test ./drive_sql "SELECT json_group_array(column1) FROM (VALUES (1)) WHERE 0"
|
Loading…
Reference in New Issue
Block a user