FionaWischer opened a new issue, #18052:
URL: https://github.com/apache/datafusion/issues/18052

   ### Describe the bug
   
   I am using Flight SQL to query data in Grafana and am now receiving an error 
code for a query that has been running without problems for several weeks. 
   
   This is what happens in the last select statement: 
   ```
   SELECT                                                                       
 
   selector_first("ID_filled", time)['time'] AS time,                      
   "ID_filled" AS "ID", 
   COUNT("ProductionTime") AS "ProductionTimeCount"                     
   FROM FilteredData
   GROUP BY "ID_filled"
   ORDER BY  time;
   ```
   
   With this select statement I am receiving this error: 
   
   > flightsql: rpc error: code = Internal desc = Error while planning query: 
Internal error: Physical input schema should be the same as the one converted 
from logical input schema. Differences: . This issue was likely caused by a bug 
in DataFusion's code. Please help us to resolve this by filing a bug report in 
our issue tracker: https://github.com/apache/datafusion/issues
   
   The bug seems to be caused by the column "ProductionTime" that should be 
counted in the last select. If I adjust the query and just change 
COUNT("ProductionTime") to COUNT("PreviousProductionTime"), I get a suitable 
output. I make sure that the column data has the right datatype and I already 
tried to cast directly in the count function. Also "PreviousProductionTime" has 
the same datatype and same amount of datapoints as "ProductionTime".
   
   
   
   ### To Reproduce
   
   _No response_
   
   ### 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: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to