You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/29 00:29:00 UTC

[GitHub] [arrow-rs] askoa opened a new pull request, #3217: User RegexSet for matching DataType

askoa opened a new pull request, #3217:
URL: https://github.com/apache/arrow-rs/pull/3217

   # Which issue does this PR close?
   
   Closes #3211 
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] ursabot commented on pull request #3217: User RegexSet for matching DataType

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #3217:
URL: https://github.com/apache/arrow-rs/pull/3217#issuecomment-1331847662

   Benchmark runs are scheduled for baseline = 1a8e6ed957e483ec27b88fce54a48b8176be3179 and contender = afa83166bfe517b4f932b9ed0e527396b2023115. afa83166bfe517b4f932b9ed0e527396b2023115 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/17dd1e099006424fb413e1e3e415a475...02d30e2af41c4bc58b1cba33ebbd2c3d/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/2cd2ee569c724cd0a398f054d67f6874...f33b541824094174b14733f947890dc9/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/e4b200d3327940aa8d014db095d44a22...80d3a1c13d3b4e049a00e61d636b98c7/)
   [Skipped :warning: Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/478852853a1842b19e4581e17a3336f0...ee6bf1ff266b45f2808f7ff92f463961/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] Jefffrey commented on a diff in pull request #3217: User RegexSet for matching DataType

Posted by GitBox <gi...@apache.org>.
Jefffrey commented on code in PR #3217:
URL: https://github.com/apache/arrow-rs/pull/3217#discussion_r1034257434


##########
arrow-csv/src/reader.rs:
##########
@@ -61,6 +61,21 @@ use csv::{ByteRecord, StringRecord};
 use std::ops::Neg;
 
 lazy_static! {
+    static ref REGEX_SET: RegexSet = RegexSet::new([
+        r"^(true)$|^(false)$", //BOOLEAN

Review Comment:
   Is the case insensitivity preserved?



##########
arrow-csv/src/reader.rs:
##########
@@ -61,6 +61,21 @@ use csv::{ByteRecord, StringRecord};
 use std::ops::Neg;
 
 lazy_static! {
+    static ref REGEX_SET: RegexSet = RegexSet::new([
+        r"^(true)$|^(false)$", //BOOLEAN
+        r"^-?((\d*\.\d+|\d+\.\d*)([eE]-?\d+)?|\d+([eE]-?\d+))$", //DECIMAL
+        r"^-?(\d+)$", //INTEGER
+        r"^\d{4}-\d\d-\d\d$", //DATE32
+        r"^\d{4}-\d\d-\d\d[T ]\d\d:\d\d:\d\d$", //DATE64
+    ]).unwrap();
+    //The order should match with REGEX_SET
+    static ref MATCH_DATA_TYPE: Vec<DataType> = vec![
+        DataType::Boolean,
+        DataType::Float64,
+        DataType::Int64,
+        DataType::Date32,
+        DataType::Date64,
+    ];
     static ref PARSE_DECIMAL_RE: Regex =
         Regex::new(r"^-?(\d+\.?\d*|\d*\.?\d+)$").unwrap();
     static ref DECIMAL_RE: Regex =

Review Comment:
   Are these used anymore?



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold merged pull request #3217: User RegexSet for matching DataType

Posted by GitBox <gi...@apache.org>.
tustvold merged PR #3217:
URL: https://github.com/apache/arrow-rs/pull/3217


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org