suxiaogang223 opened a new issue, #3735:
URL: https://github.com/apache/arrow-rs/issues/3735

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   <!--
   A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...] 
   (This section helps Arrow developers understand the context and *why* for 
this feature, in addition to  the *what*)
   -->
   The `Parser` has been impled for these arrow_array::types:
   
https://docs.rs/arrow-cast/33.0.0/arrow_cast/parse/trait.Parser.html#foreign-impls
   Maybe we could impl `Parser` for more types, eg Decimal128 and Decimal256 
and so on.
   Uniformly resolving the type interface can reduce much code.
   
   **Describe the solution you'd like**
   <!--
   A clear and concise description of what you want to happen.
   -->
   Impl `Parser` for the types in 
https://docs.rs/arrow-array/33.0.0/arrow_array/types/index.html
   
   **Describe alternatives you've considered**
   <!--
   A clear and concise description of any alternative solutions or features 
you've considered.
   -->
   This may be required to add more methods to `Parser`.
   
   For example, to impl Parser for Decinal we should add this:
   ```rust
   pub trait Parser: ArrowPrimitiveType {
       fn parse(string: &str) -> Option<Self::Native>;
   
       fn parse_formatted(string: &str, _format: &str) -> Option<Self::Native> {
           Self::parse(string)
       }
   
       /// add for Parse Decimal
       fn parse_with_parameter(string: &str, _precision: u8, _scale: i8) -> 
Option<Self::Native> {
           Self::parse(string)
       }
   }
   ```
   
   Or consider making the parse function receive arbitrary arguments so that it 
can only need itself by `Parser`?
   
   **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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to