Empty lua table returns EmptyMap since 5.0.1 #3874
Replies: 2 comments 2 replies
-
Hi @ngavrailov, I checked, and I see that |
Beta Was this translation helpful? Give feedback.
-
Hi guys I'm having a similar problem so that I will join this thread. I am encountering a significant issue after migrating from Jedis version 4.3 to 5.1. My code, which worked fine in 4.3, is now encountering inconsistent and unexpected behavior. Code OverviewHere is a simplified version of my Scala code: val result = redisCluster.eval(script, keys, arguments)
import java.util
val asList = result.asInstanceOf[util.ArrayList[_]]
val state = asList.get(0).asInstanceOf[String]
val latestEvents = asList.get(1).asInstanceOf[util.ArrayList[_]].asInstanceOf[util.ArrayList[String]] Lua ScriptThe Lua script being executed is as follows: local nrt_feature = redis.call('HMGET', nrt_key, "value1", "value2")
local nrt_feature_value = nrt_feature[2]
local events_to_aggregate = redis.call("ZRANGEBYSCORE", key, min, max)
return { nrt_feature_value, events_to_aggregate } Behavior in Jedis 4.3In Jedis 4.3, the returned data structures were consistent and the Scala code processed them correctly. For example:
Issues in Jedis 5.1After upgrading to Jedis 5.1, I am encountering the following problems:
Example Scenarios
Additional InformationIt appears that the return type handling of the Could you please advise on whether this is an intended change, or if there might be a bug or configuration issue that I need to address? Thank you for your assistance! Details
|
Beta Was this translation helpful? Give feedback.
-
Hello,
What is the point of this change? Currently we are having issues with existing lua scripts, because of difference when the lua table is populated as list and when it is returned empty. Maybe we are not using the output correct expecting lists? Can you suggest how to handle table responses?
Best regards,
Nikolay
Beta Was this translation helpful? Give feedback.
All reactions