You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "byteink (via GitHub)" <gi...@apache.org> on 2023/06/09 04:46:45 UTC

[GitHub] [arrow-datafusion] byteink opened a new issue, #6606: Optimizer rule `scalar_subquery_to_join` generates a different schema

byteink opened a new issue, #6606:
URL: https://github.com/apache/arrow-datafusion/issues/6606

   ### Describe the bug
   
   Internal error: Optimizer rule 'scalar_subquery_to_join' failed, due to generate a different schema, 
     
   original schema: DFSchema { fields: [DFField { qualifier: None, field: Field { name: "t.a > **AVG(t.a)**", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} } }], metadata: {} }, 
   
   new schema  : DFSchema { fields: [DFField { qualifier: None, field: Field { name: "t.a > **__scalar_sq_1.__value**", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} } }], metadata: {} }. 
   
   This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
   
   ### To Reproduce
   
   ```shell
   DataFusion CLI v26.0.0
   ❯ create table t(a int);
   0 rows in set. Query took 0.005 seconds.
   
   ❯ select a > (select avg(a) from t) from t;
   scalar_subquery_to_join
   caused by
   Internal error: Optimizer rule 'scalar_subquery_to_join' failed, due to generate a different schema, original schema: DFSchema { fields: [DFField { qualifier: None, field: Field { name: "t.a > AVG(t.a)", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} } }], metadata: {} }, new schema: DFSchema { fields: [DFField { qualifier: None, field: Field { name: "t.a > __scalar_sq_1.__value", data_type: Boolean, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} } }], metadata: {} }. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
   
   ```
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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.apache.org

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


[GitHub] [arrow-datafusion] jackwener closed issue #6606: Optimizer rule `scalar_subquery_to_join` generates a different schema

Posted by "jackwener (via GitHub)" <gi...@apache.org>.
jackwener closed issue #6606: Optimizer rule `scalar_subquery_to_join` generates a different schema
URL: https://github.com/apache/arrow-datafusion/issues/6606


-- 
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] mingmwang commented on issue #6606: Optimizer rule `scalar_subquery_to_join` generates a different schema

Posted by "mingmwang (via GitHub)" <gi...@apache.org>.
mingmwang commented on issue #6606:
URL: https://github.com/apache/arrow-datafusion/issues/6606#issuecomment-1605953135

   @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] mingmwang commented on issue #6606: Optimizer rule `scalar_subquery_to_join` generates a different schema

Posted by "mingmwang (via GitHub)" <gi...@apache.org>.
mingmwang commented on issue #6606:
URL: https://github.com/apache/arrow-datafusion/issues/6606#issuecomment-1587304779

   I will take a look


-- 
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] parkma99 commented on issue #6606: Optimizer rule `scalar_subquery_to_join` generates a different schema

Posted by "parkma99 (via GitHub)" <gi...@apache.org>.
parkma99 commented on issue #6606:
URL: https://github.com/apache/arrow-datafusion/issues/6606#issuecomment-1587510777

   > I will take a look
   
   I think it's because the code [L98](https://github.com/apache/arrow-datafusion/blob/d584d55a9dd1c729ef8ef6d1a3d9151d221ee7d9/datafusion/optimizer/src/scalar_subquery_to_join.rs#L98) to [L102](https://github.com/apache/arrow-datafusion/blob/d584d55a9dd1c729ef8ef6d1a3d9151d221ee7d9/datafusion/optimizer/src/scalar_subquery_to_join.rs#L102) should check subquery is a `scalar query` or not.


-- 
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] mingmwang commented on issue #6606: Optimizer rule `scalar_subquery_to_join` generates a different schema

Posted by "mingmwang (via GitHub)" <gi...@apache.org>.
mingmwang commented on issue #6606:
URL: https://github.com/apache/arrow-datafusion/issues/6606#issuecomment-1605953000

   @parkma99 
   I think the issue is fixed after this PR https://github.com/apache/arrow-datafusion/pull/6457.
   I had verified and the error is gone.
   


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