Bug 133379 - TEXTJOIN delimiters not synchronized if ignore_empty
Summary: TEXTJOIN delimiters not synchronized if ignore_empty
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-25 16:06 UTC by Joshua Coppersmith
Modified: 2020-09-08 07:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Bug 133379 Example (21.67 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-09-07 17:31 UTC, Joshua Coppersmith
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Coppersmith 2020-05-25 16:06:00 UTC
Description:
When using TEXTJOIN with a constant array for the delimiters and ignore_empty is set true the delimiter picked from the constant array is not advanced when an empty cell/field is encountered which desynchronizes the multiple delimiters from their obviously intended purpose to represent data hierarchy (to distinguish fields and fields from records).

Steps to Reproduce:
Enter TEXTJOIN like =TEXTJOIN({",",",",";"},1,F9:H11) either as part of a CSE/array formula or just a normal cell formula.

Actual Results:
With range fully populate behaviour is as expected, like

1	a	A
2	b	B
3	c	C
		
TextJoin:	1,a,A;2,b,B;3,c,C	

With any empty cell, the delimiters blindly repeat in cycle and become meaningless, like:

1		A
2	b	B
3	c	C
		
TextJoin:	1,A,2;b,B,3;c,C	

Expected Results:
The expected result would be:

1		A
2	b	B
3	c	C
		
TextJoin:	1,A;2,b,B;3,c,C	


Reproducible: Always


User Profile Reset: No



Additional Info:
I do not have access to MS Excel 2019, but https://support.office.com/en-us/article/TEXTJOIN-function implies that TEXTJOIN is meant to be able to distinguish data fields from data records, etc.

Version: 6.4.3.2
Build ID: 747b5d0ebf89f41c860ec2a39efd7cb15b54f2d8
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Joshua Coppersmith 2020-05-25 16:12:21 UTC
Delimiters argument can be constant array or range specifier, there is nothing particular to a constant array.
Comment 2 m_a_riosv 2020-05-25 21:23:29 UTC
So please attach a sample file.
Comment 3 Joshua Coppersmith 2020-09-07 17:31:30 UTC
Created attachment 165245 [details]
Bug 133379 Example

Adding a sample ODF file illustrating exactly what was reported in the initial bug report.
Comment 4 m_a_riosv 2020-09-08 07:52:17 UTC
I don't think your assumption it's right.

Separator it's applied in the same order it is given, cell by cell on the result. Skipping empties cells on the input cell's range, not to the separator's array, which look find for me, separators has the same position along the resulting string.
And in relation with the compatibility, excel does the same.