logan-keede commented on code in PR #14254:
URL: https://github.com/apache/datafusion/pull/14254#discussion_r1929233787


##########
datafusion/sqllogictest/bin/sqllogictests.rs:
##########
@@ -64,6 +66,171 @@ fn value_normalizer(s: &String) -> String {
     s.trim_end().to_string()
 }
 
+struct CustomRunner<D: AsyncDB, M: MakeConnection> {
+    runner: Runner<D, M>,
+}
+
+impl<D: AsyncDB, M: MakeConnection<Conn = D>> CustomRunner<D, M> {
+    pub fn new(make_conn: M) -> Self {
+        CustomRunner {
+            runner: Runner::new(make_conn),
+        }
+    }
+
+    pub async fn update_test_file(
+        &mut self,
+        filename: impl AsRef<Path>,
+        col_separator: &str,
+        validator: Validator,
+        normalizer: Normalizer,
+        column_type_validator: ColumnTypeValidator<D::ColumnType>,
+    ) -> Result<(), Box<dyn std::error::Error>> {
+        use std::io::{Read, Seek, SeekFrom, Write};
+        use std::path::PathBuf;
+
+        use std::fs::{File, OpenOptions};
+
+        fn create_outfile(
+            filename: impl AsRef<Path>,
+        ) -> std::io::Result<(PathBuf, File)> {
+            let filename = filename.as_ref();
+            // let outfilename = format!(
+            //     "{}.{:016x}.temp",
+            //     filename.file_name().unwrap().to_str().unwrap(),
+            //     Instant::now().as_nanos()
+            // );
+            let outfilename = 
filename.file_name().unwrap().to_str().unwrap().to_owned()
+                + &format!("{:?}", Instant::now())

Review Comment:
   then I will just use that, thanks for the heads up



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