You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by "chaokunyang (via GitHub)" <gi...@apache.org> on 2024/05/09 14:52:14 UTC
[I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
chaokunyang opened a new issue, #1619:
URL: https://github.com/apache/incubator-fury/issues/1619
## Is your feature request related to a problem? Please describe.
In #1514 and #1566 , we compress every char using 5/6 bytes. But we didn't check the encoding is ascii. In UTF-8, some byte may be in range of ascii char, but some not. We may take a utf-8 string as a meta string by accident?
## Describe the solution you'd like
Check string is ascii before using meta string encoding
## Additional context
<!-- Add any other context or screenshots about the feature request here. -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui closed issue #1619: [Java|Go] Check string is ascii before using meta string encoding
URL: https://github.com/apache/incubator-fury/issues/1619
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "jasonmokk (via GitHub)" <gi...@apache.org>.
jasonmokk commented on issue #1619:
URL: https://github.com/apache/incubator-fury/issues/1619#issuecomment-2103581626
Hi @chaokunyang I'd love to contribute to Apache Fury, can you please assign this issue to me?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "jasonmokk (via GitHub)" <gi...@apache.org>.
jasonmokk commented on issue #1619:
URL: https://github.com/apache/incubator-fury/issues/1619#issuecomment-2105361892
@LiangliangSui Thanks for bringing that up, can I submit another PR to correct that/add unit tests? I also think it would be optimal to have the ASCII check early and return a UTF-8 encoded `MetaString`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui commented on issue #1619:
URL: https://github.com/apache/incubator-fury/issues/1619#issuecomment-2103704170
Great! thanks for the willingness to contribute to Fury.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui commented on issue #1619:
URL: https://github.com/apache/incubator-fury/issues/1619#issuecomment-2104181194
In addition, we also need to add unit tests to cover this issue
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #1619: [Java|Go] Check string is ascii before using meta string encoding
URL: https://github.com/apache/incubator-fury/issues/1619
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui commented on issue #1619:
URL: https://github.com/apache/incubator-fury/issues/1619#issuecomment-2104164545
```java
// org/apache/fury/meta/MetaStringEncoder.java
public MetaString encode(String input) {
if (input.isEmpty()) {
return new MetaString(input, Encoding.UTF_8, specialChar1, specialChar2, new byte[0]);
}
Encoding encoding = computeEncoding(input);
return encode(input, encoding);
}
```
Could we judge here whether the `input` is all ASCII encoded? If not, just return UTF-8 encoded `MetaString` directly, so that we can save time on `computeEncoding` and `encode`.
WDYT @chaokunyang
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
Re: [I] [Java|Go] Check string is ascii before using meta string encoding [incubator-fury]
Posted by "LiangliangSui (via GitHub)" <gi...@apache.org>.
LiangliangSui commented on issue #1619:
URL: https://github.com/apache/incubator-fury/issues/1619#issuecomment-2106794655
> can I submit another PR to correct that/add unit tests?
Sure, that is great!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org