Thanks for your reply Nikita.
Here is what I see for GROUP_CONCAT via Aginity/Workbench:
I see the same result/return value that you see -> 4096.
Can that value be increased?
------------------------------
David Briars
------------------------------
Original Message:
Sent: Mon July 18, 2022 10:58 AM
From: Nikita Nirbhavane
Subject: GROUP_CONCAT() - ERROR: String returned from Lua is larger than state value definition!
I was not able to repro the error mentioned for a varchar(3975). But the reason for this could be that the mentioned result and state value is 4096.
Compiling: /nz/extensions/nz/nzlua/examples/group_concat.nzl
####################################################################
UdxName = group_concat
UdxType = UDA
Arguments = VARCHAR(128)
Result = VARCHAR(4096)
State = VARCHAR(4096)
Dependencies = INZA.INZA.LIBNZLUA_11_2_25
Comment = MySQL group_concat function
NZUDXCOMPILE OPTIONS: (--replbyval --unfenced --type ANY --mem 2m)
CREATE AGGREGATE
COMMENT
Can you provide more details around the repro?
- DDL of the database objects involved.
- The exact SQL.
- Also are you using the lua source from /nz/extensions/nz/nzlua/examples/group_concat.nzl ?
------------------------------
Nikita Nirbhavane
Original Message:
Sent: Fri July 15, 2022 04:51 PM
From: David Briars
Subject: GROUP_CONCAT() - ERROR: String returned from Lua is larger than state value definition!
With a little more testing I have determined that as long as the resultant field is less than 3,975 bytes, my query does not get the 'ERROR: String returned from Lua is larger than state value definition!
' message.
My code looks like this:
GROUP_CONCAT(NVL(mypool,'')) AS pool
Is there some way to allow the results of the GROUP_CONCAT to return more than 3,975 bytes?
'mypool' is VARCHAR(7) in the database, if that is a factor.
------------------------------
David Briars
Original Message:
Sent: Fri July 15, 2022 03:57 PM
From: John Skier
Subject: GROUP_CONCAT() - ERROR: String returned from Lua is larger than state value definition!
NPS Max size for CHAR, VARCAHR is 64000 bytes, NCHAR, NVARCHAR is 16,000 these are hard limits. LUA's limit is greater, so Lua should not be the limiting factor. If your not using varchar(ANY) you may want to consider changing your code.
------------------------------
John Skier
Integration Architect
IBM
682 220 6587
Original Message:
Sent: Mon July 11, 2022 03:39 PM
From: David Briars
Subject: GROUP_CONCAT() - ERROR: String returned from Lua is larger than state value definition!
I am using GROUP_CONCAT to concatenate a field.
There can be many instances of the field to be concatenated.
I am obtaining the following error when using GROUP_CONCAT() in a case were I have many instances to be grouped:
ERROR: String returned from Lua is larger than state value definition!
Any ideas on what is the limitation with GROUP_CONCAT?
Any way to increase the limit?
------------------------------
David Briars
------------------------------
#NetezzaPerformanceServer