gaojun2048 opened a new issue #1654:
URL: https://github.com/apache/arrow-datafusion/issues/1654


   **Describe the bug**
   A task is never run when its referenced_task tasks fail. And the job never 
to run completion(fail or completion).
   
   **To Reproduce**
   
   I added a test and the job's never run to completion now.
   
   ```
   #[tokio::test]
       #[cfg(feature = "standalone")]
       async fn test_task_stuck_when_referenced_task_failed() {
           use super::*;
           use ballista_core::config::{
               BallistaConfigBuilder, BALLISTA_WITH_INFORMATION_SCHEMA,
           };
           use std::fs::File;
           use std::io::Write;
           use tempfile::TempDir;
           let config = BallistaConfigBuilder::default()
               .set(BALLISTA_WITH_INFORMATION_SCHEMA, "true")
               .build()
               .unwrap();
           let context = BallistaContext::standalone(&config, 1).await.unwrap();
   
           let testdata = datafusion::test_util::parquet_test_data();
           context.register_parquet("single_nan", 
&format!("{}/single_nan.parquet", testdata))
               .await
               .unwrap();
   
           {
               let mut guard = context.state.lock().unwrap();
               let csv_table = guard.tables.get("single_nan");
   
               if let Some(table_provide) = csv_table {
                   if let Some(listing_table) = table_provide
                       .clone()
                       .as_any()
                       .downcast_ref::<ListingTable>()
                   {
                       let x = listing_table.options();
                       let error_options = ListingOptions {
                           file_extension: x.file_extension.clone(),
                           format: Arc::new(CsvFormat::default()),
                           table_partition_cols: x.table_partition_cols.clone(),
                           collect_stat: x.collect_stat,
                           target_partitions: x.target_partitions,
                       };
                       let error_table = ListingTable::new(
                           listing_table.object_store().clone(),
                           listing_table.table_path().to_string(),
                           Arc::new(Schema::new(vec![])),
                           error_options,
                       );
                       // change the table to an error table
                       guard
                           .tables
                           .insert("single_nan".to_string(), 
Arc::new(error_table));
                   }
               }
           }
   
           let df = context.sql("select count(1) from 
single_nan;").await.unwrap();
           let results = df.collect().await.unwrap();
           pretty::print_batches(&results);
       }
   ```
   
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Additional context**
   Add any other context about the problem 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