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 2021/12/09 09:38:33 UTC

[GitHub] [arrow-datafusion] liukun4515 opened a new pull request #1423: minor fix and make align with float->float32

liukun4515 opened a new pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423


   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   minor fix and followup for https://github.com/apache/arrow-datafusion/pull/1390
   
    # Rationale for this change
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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-datafusion] liukun4515 commented on pull request #1423: minor fix and make align with float->float32

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423#issuecomment-989897130


   Yes.
   In the datafusion [README.md](https://github.com/apache/arrow-datafusion/blob/6955a8d9279bf06311fe0d9d7428854b0601059d/README.md?plain=1#L345), the SQL float is corresponding to the arrow-FLOAT32.
   
   @alamb 


-- 
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-datafusion] alamb commented on a change in pull request #1423: minor fix and make align with float->float64

Posted by GitBox <gi...@apache.org>.
alamb commented on a change in pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423#discussion_r765829689



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1989,10 +1989,10 @@ fn extract_possible_join_keys(
 pub fn convert_data_type(sql: &SQLDataType) -> Result<DataType> {
     match sql {
         SQLDataType::Boolean => Ok(DataType::Boolean),
-        SQLDataType::SmallInt(_display) => Ok(DataType::Int16),
-        SQLDataType::Int(_display) => Ok(DataType::Int32),
-        SQLDataType::BigInt(_display) => Ok(DataType::Int64),
-        SQLDataType::Float(_) => Ok(DataType::Float64),
+        SQLDataType::SmallInt(_) => Ok(DataType::Int16),
+        SQLDataType::Int(_) => Ok(DataType::Int32),
+        SQLDataType::BigInt(_) => Ok(DataType::Int64),
+        SQLDataType::Float(_) => Ok(DataType::Float32),

Review comment:
       This PR changes `FLOAT` to use `Float32` (rather than `Float64`). Was that the intention?




-- 
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-datafusion] liukun4515 commented on a change in pull request #1423: minor fix and make align with float->float32

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on a change in pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423#discussion_r765674632



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1989,10 +1989,10 @@ fn extract_possible_join_keys(
 pub fn convert_data_type(sql: &SQLDataType) -> Result<DataType> {
     match sql {
         SQLDataType::Boolean => Ok(DataType::Boolean),
-        SQLDataType::SmallInt(_display) => Ok(DataType::Int16),
-        SQLDataType::Int(_display) => Ok(DataType::Int32),
-        SQLDataType::BigInt(_display) => Ok(DataType::Int64),
-        SQLDataType::Float(_) => Ok(DataType::Float64),
+        SQLDataType::SmallInt(_) => Ok(DataType::Int16),
+        SQLDataType::Int(_) => Ok(DataType::Int32),
+        SQLDataType::BigInt(_) => Ok(DataType::Int64),
+        SQLDataType::Float(_) => Ok(DataType::Float32),

Review comment:
       The SQL FLOAT datatype is corresponding to the Arrow Float64.
   




-- 
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-datafusion] alamb commented on pull request #1423: Make `FLOAT` SQL type map to `Float32` rather than `Float64`

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423#issuecomment-989913529


   Thank you @liukun4515 


-- 
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-datafusion] liukun4515 commented on a change in pull request #1423: minor fix and make align with float->float32

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on a change in pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423#discussion_r765674632



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1989,10 +1989,10 @@ fn extract_possible_join_keys(
 pub fn convert_data_type(sql: &SQLDataType) -> Result<DataType> {
     match sql {
         SQLDataType::Boolean => Ok(DataType::Boolean),
-        SQLDataType::SmallInt(_display) => Ok(DataType::Int16),
-        SQLDataType::Int(_display) => Ok(DataType::Int32),
-        SQLDataType::BigInt(_display) => Ok(DataType::Int64),
-        SQLDataType::Float(_) => Ok(DataType::Float64),
+        SQLDataType::SmallInt(_) => Ok(DataType::Int16),
+        SQLDataType::Int(_) => Ok(DataType::Int32),
+        SQLDataType::BigInt(_) => Ok(DataType::Int64),
+        SQLDataType::Float(_) => Ok(DataType::Float32),

Review comment:
       The SQL FLOAT datatype is corresponding to the Arrow Float32




-- 
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-datafusion] liukun4515 commented on a change in pull request #1423: minor fix and make align with float->float32

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on a change in pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423#discussion_r765834244



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1989,10 +1989,10 @@ fn extract_possible_join_keys(
 pub fn convert_data_type(sql: &SQLDataType) -> Result<DataType> {
     match sql {
         SQLDataType::Boolean => Ok(DataType::Boolean),
-        SQLDataType::SmallInt(_display) => Ok(DataType::Int16),
-        SQLDataType::Int(_display) => Ok(DataType::Int32),
-        SQLDataType::BigInt(_display) => Ok(DataType::Int64),
-        SQLDataType::Float(_) => Ok(DataType::Float64),
+        SQLDataType::SmallInt(_) => Ok(DataType::Int16),
+        SQLDataType::Int(_) => Ok(DataType::Int32),
+        SQLDataType::BigInt(_) => Ok(DataType::Int64),
+        SQLDataType::Float(_) => Ok(DataType::Float32),

Review comment:
       Yes.
   In the datafusion [README.md](https://github.com/apache/arrow-datafusion/blob/6955a8d9279bf06311fe0d9d7428854b0601059d/README.md?plain=1#L345), the SQL float is corresponding to the arrow-FLOAT32.




-- 
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-datafusion] liukun4515 commented on a change in pull request #1423: minor fix and make align with float->float64

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on a change in pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423#discussion_r765674632



##########
File path: datafusion/src/sql/planner.rs
##########
@@ -1989,10 +1989,10 @@ fn extract_possible_join_keys(
 pub fn convert_data_type(sql: &SQLDataType) -> Result<DataType> {
     match sql {
         SQLDataType::Boolean => Ok(DataType::Boolean),
-        SQLDataType::SmallInt(_display) => Ok(DataType::Int16),
-        SQLDataType::Int(_display) => Ok(DataType::Int32),
-        SQLDataType::BigInt(_display) => Ok(DataType::Int64),
-        SQLDataType::Float(_) => Ok(DataType::Float64),
+        SQLDataType::SmallInt(_) => Ok(DataType::Int16),
+        SQLDataType::Int(_) => Ok(DataType::Int32),
+        SQLDataType::BigInt(_) => Ok(DataType::Int64),
+        SQLDataType::Float(_) => Ok(DataType::Float32),

Review comment:
       The SQL FLOAT datatype is corresponding to the Arrow Float64.
   




-- 
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-datafusion] alamb merged pull request #1423: Make `FLOAT` SQL type map to `Float32` rather than `Float64`

Posted by GitBox <gi...@apache.org>.
alamb merged pull request #1423:
URL: https://github.com/apache/arrow-datafusion/pull/1423


   


-- 
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