We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前PartitionByMod传参仅仅支持int类型参数,string参数会报IllegalArgumentException异常。但是社区群里面反馈需要支持string类型
string类型的参数,转换成其hashcode的绝对值,然后再计算hahs,形如:
int value = Math.abs((columnValue).hashCode()); return value % count;
The text was updated successfully, but these errors were encountered:
Merge pull request #2621 from funnyAnt/issue#2619
42075e4
#2619 PartitionByMod路由函数支持string参数
No branches or pull requests
问题
目前PartitionByMod传参仅仅支持int类型参数,string参数会报IllegalArgumentException异常。但是社区群里面反馈需要支持string类型
方案
string类型的参数,转换成其hashcode的绝对值,然后再计算hahs,形如:
The text was updated successfully, but these errors were encountered: