You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2026/01/06 13:10:18 UTC

[PR] Remove dependency on rust_decimal [datafusion]

alamb opened a new pull request, #19666:
URL: https://github.com/apache/datafusion/pull/19666

   ## Which issue does this PR close?
   
   - Part of https://github.com/apache/datafusion/issues/19656
   
   
   ## Rationale for this change
   rust_decimal is a one person crate and is released somewhat infrequently
   * https://github.com/paupino/rust-decimal
   * https://crates.io/crates/rust_decimal
   
   It also uses a non trivial number of dependencies, including https://crates.io/crates/rkyv, some sort of zero copy deserialization framework that was recently subject to a RUSTSEC security advisory, see https://github.com/apache/datafusion/issues/19656 / https://github.com/apache/datafusion/pull/19657
   
   Since `rust_decimal` is only used for sqllogictests to parse the results from postgres, we can pretty easily remove the dependency on `rust_decimal` and inline the very small amount functionality we need for sqllogictests
   
   This will both decrease the build time and our dependency trail.
   
   
   ## What changes are included in this PR?
   
   Removes the `rust_decimal` dependency from DataFusion
   and inlines the smallest required subset of decimal functionality we need for
   sqllogictests (which turns out to be pretty small)
   
   ## Are these changes tested?
   
   Yes by CI
   
   ## Are there any user-facing changes?
   No, this is all internal testing infrastructure


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2668124876


##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -299,8 +297,15 @@ impl sqllogictest::AsyncDB for Postgres {
             self.pb.inc(1);
             return Ok(DBOutput::StatementComplete(0));
         }
+        let statement = self.get_client().prepare(sql).await?;
+        let types: Vec<Type> = statement
+            .columns()
+            .iter()
+            .map(|c| c.type_().clone())
+            .collect();
+
         let start = Instant::now();
-        let rows = self.get_client().query(sql, &[]).await?;
+        let messages = self.get_client().simple_query(sql).await?;

Review Comment:
   > I suspect we won't be able to even tell the difference.
   
   👍🏻 
   If the execution time of the .slt tests is similar as before then there is no need to optimize further.
   



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #19666:
URL: https://github.com/apache/datafusion/pull/19666


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#issuecomment-3718490002

   > I also encoutered RUSTSEC issue when working on the PR #19661.
   > 
   > Thanks for the fix, do you mind cherry-picking the PR to branch-52 after it's merged? Then I'll update the PR19661
   
   Sure!
   
   I think we can probably backport https://github.com/apache/datafusion/pull/19657 to the 52 line temporarily -- I will do so


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2664880603


##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -299,8 +297,15 @@ impl sqllogictest::AsyncDB for Postgres {
             self.pb.inc(1);
             return Ok(DBOutput::StatementComplete(0));
         }
+        let statement = self.get_client().prepare(sql).await?;
+        let types: Vec<Type> = statement
+            .columns()
+            .iter()
+            .map(|c| c.type_().clone())
+            .collect();
+
         let start = Instant::now();
-        let rows = self.get_client().query(sql, &[]).await?;
+        let messages = self.get_client().simple_query(sql).await?;

Review Comment:
   drive by cleanup to improve getting types -- use a prepared statement rather than running and looking at the first row



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "martin-g (via GitHub)" <gi...@apache.org>.
martin-g commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2666139278


##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -299,8 +297,15 @@ impl sqllogictest::AsyncDB for Postgres {
             self.pb.inc(1);
             return Ok(DBOutput::StatementComplete(0));
         }
+        let statement = self.get_client().prepare(sql).await?;
+        let types: Vec<Type> = statement
+            .columns()
+            .iter()
+            .map(|c| c.type_().clone())
+            .collect();
+
         let start = Instant::now();
-        let rows = self.get_client().query(sql, &[]).await?;
+        let messages = self.get_client().simple_query(sql).await?;

Review Comment:
   This now always makes two queries - one for the types and another for the messages.
   Before it was making the second query only if there were no messages.
   Wouldn't this increase the time to run the test suite ?



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#issuecomment-3720389845

   Thank you again @martin-g  for your insightful review


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2664880603


##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -299,8 +297,15 @@ impl sqllogictest::AsyncDB for Postgres {
             self.pb.inc(1);
             return Ok(DBOutput::StatementComplete(0));
         }
+        let statement = self.get_client().prepare(sql).await?;
+        let types: Vec<Type> = statement
+            .columns()
+            .iter()
+            .map(|c| c.type_().clone())
+            .collect();
+
         let start = Instant::now();
-        let rows = self.get_client().query(sql, &[]).await?;
+        let messages = self.get_client().simple_query(sql).await?;

Review Comment:
   drive by cleanup



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2668090587


##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -299,8 +297,15 @@ impl sqllogictest::AsyncDB for Postgres {
             self.pb.inc(1);
             return Ok(DBOutput::StatementComplete(0));
         }
+        let statement = self.get_client().prepare(sql).await?;
+        let types: Vec<Type> = statement
+            .columns()
+            .iter()
+            .map(|c| c.type_().clone())
+            .collect();
+
         let start = Instant::now();
-        let rows = self.get_client().query(sql, &[]).await?;
+        let messages = self.get_client().simple_query(sql).await?;

Review Comment:
   I played around with this more -- the reason there are two queries now is that the "simple_query" API returns only text (no types) but the sqllogictest harness needs to get type information
   
   However, if we use the  prepared statement API that returns types, we must also then have code to parse the postgres binary numeric representation (what I think we are using the rust_decimal crate for).
   
   On the balance, I think planning the query twice, while it does have additional overhead, is better than a bunch of custom numeric parsing code. Given the small number of queries that are run in this mode I suspect we won't be able to even tell the difference. 
   
   I will add comments explaining this rationale
   
   In case we want to avoid the second planning, here is the code that I wrote with codex (I am not 100% sure it correctly implements numeric parsing):
   
   ```rust
   
   
   fn convert_rows(rows: &[Row]) -> Vec<Vec<String>> {
       rows.iter()
           .map(|row| {
               row.columns()
                   .iter()
                   .enumerate()
                   .map(|(idx, column)| cell_to_string(row, column, idx))
                   .collect::<Vec<String>>()
           })
           .collect::<Vec<_>>()
   }
   
   fn cell_to_string(row: &Row, column: &Column, idx: usize) -> String {
       // Decode binary values by Postgres type to keep normalization aligned with
       // the DataFusion engine output.
       match column.type_().clone() {
           Type::CHAR => {
               let value: Option<i8> = row.get(idx);
               value
                   .map(|value| value.to_string())
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::INT2 => {
               let value: Option<i16> = row.get(idx);
               value
                   .map(|value| value.to_string())
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::INT4 => {
               let value: Option<i32> = row.get(idx);
               value
                   .map(|value| value.to_string())
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::INT8 => {
               let value: Option<i64> = row.get(idx);
               value
                   .map(|value| value.to_string())
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::NUMERIC => {
               let value: Option<PgNumeric> = row.get(idx);
               match value {
                   Some(PgNumeric(PgNumericValue::Number(value))) => decimal_to_str(value),
                   Some(PgNumeric(PgNumericValue::NaN)) => "NaN".to_string(),
                   None => NULL_STR.to_string(),
               }
           }
           Type::DATE => {
               let value: Option<NaiveDate> = row.get(idx);
               value
                   .map(|value| value.to_string())
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::TIME => {
               let value: Option<NaiveTime> = row.get(idx);
               value
                   .map(|value| value.to_string())
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::TIMESTAMP => {
               let value: Option<NaiveDateTime> = row.get(idx);
               value
                   .map(|value| format!("{value:?}"))
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::BOOL => {
               let value: Option<bool> = row.get(idx);
               value.map(bool_to_str).unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::BPCHAR | Type::VARCHAR | Type::TEXT => {
               let value: Option<&str> = row.get(idx);
               value
                   .map(varchar_to_str)
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::FLOAT4 => {
               let value: Option<f32> = row.get(idx);
               value.map(f32_to_str).unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::FLOAT8 => {
               let value: Option<f64> = row.get(idx);
               value.map(f64_to_str).unwrap_or_else(|| NULL_STR.to_string())
           }
           Type::REGTYPE => {
               let value: Option<u32> = row.get(idx);
               value
                   .and_then(Type::from_oid)
                   .map(|value| value.to_string())
                   .unwrap_or_else(|| NULL_STR.to_string())
           }
           _ => unimplemented!("Unsupported type: {}", column.type_().name()),
       }
   }
   
   
   /// Minimal `NUMERIC` decoder for Postgres' binary format.
   ///
   /// We use it in sqllogictest to avoid pulling in `rust_decimal` while still
   /// converting `NUMERIC` values into `BigDecimal` for normalized output.
   ///
   /// Verification:
   /// - The binary layout and field meanings come from the Postgres protocol docs:
   ///   https://www.postgresql.org/docs/current/protocol-message-formats.html#PROTOCOL-MESSAGE-FORMATS-NUMERIC
   /// - You can sanity-check correctness by comparing decoded values against the
   ///   server's text format, e.g. run `SELECT value::numeric, value::text` in
   ///   Postgres and ensure this parser produces the same normalized string.
   enum PgNumericValue {
       Number(BigDecimal),
       NaN,
   }
   
   /// Wrapper type that implements `FromSql` for Postgres `NUMERIC` values.
   ///
   /// This is intentionally scoped to the sqllogictest engine so we can parse
   /// binary `NUMERIC` results in a single query without extra dependencies.
   struct PgNumeric(PgNumericValue);
   
   impl<'a> postgres_types::FromSql<'a> for PgNumeric {
       fn from_sql(
           ty: &Type,
           raw: &'a [u8],
       ) -> Result<Self, Box<dyn std::error::Error + Sync + Send>> {
           if *ty != Type::NUMERIC {
               return Err("invalid type".into());
           }
   
           let mut buf = raw;
           let ndigits = read_i16(&mut buf)? as i64;
           let weight = read_i16(&mut buf)? as i64;
           let sign = read_i16(&mut buf)?;
           let _dscale = read_i16(&mut buf)?;
   
           const NUMERIC_POS: i16 = 0x0000;
           const NUMERIC_NEG: i16 = 0x4000;
           const NUMERIC_NAN: i16 = 0xC000u16 as i16;
   
           if sign == NUMERIC_NAN {
               return Ok(PgNumeric(PgNumericValue::NaN));
           }
   
           let mut bigint = BigInt::from(0);
           for _ in 0..ndigits {
               let digit = read_i16(&mut buf)? as i64;
               bigint = bigint * 10000 + digit;
           }
   
           if sign == NUMERIC_NEG {
               bigint = -bigint;
           } else if sign != NUMERIC_POS {
               return Err(format!("invalid numeric sign {sign}").into());
           }
   
           let scale = if ndigits == 0 {
               0
           } else {
               (ndigits - (weight + 1)) * 4
           };
           let value = BigDecimal::from_bigint(bigint, scale);
   
           Ok(PgNumeric(PgNumericValue::Number(value)))
       }
   
       fn accepts(ty: &Type) -> bool {
           *ty == Type::NUMERIC
       }
   }
   
   fn read_i16(buf: &mut &[u8]) -> Result<i16, Box<dyn std::error::Error + Sync + Send>> {
       if buf.len() < 2 {
           return Err("invalid buffer size".into());
       }
       let val = i16::from_be_bytes([buf[0], buf[1]]);
       *buf = &buf[2..];
       Ok(val)
   }
   
   fn convert_types(types: Vec<Type>) -> Vec<DFColumnType> {
       types
           .into_iter()
           .map(|t| match t {
               Type::BOOL => DFColumnType::Boolean,
               Type::INT2 | Type::INT4 | Type::INT8 => DFColumnType::Integer,
               Type::BPCHAR | Type::VARCHAR | Type::TEXT => DFColumnType::Text,
               Type::FLOAT4 | Type::FLOAT8 | Type::NUMERIC => DFColumnType::Float,
               Type::DATE | Type::TIME => DFColumnType::DateTime,
               Type::TIMESTAMP => DFColumnType::Timestamp,
               _ => DFColumnType::Another,
           })
           .collect()
   }
   
   ```



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#issuecomment-3720418738

   @xudong963  here is the backport PR:
   - https://github.com/apache/datafusion/pull/19686


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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2664879635


##########
.github/workflows/audit.yml:
##########
@@ -46,7 +46,6 @@ jobs:
         with:
           tool: cargo-audit
       - name: Run audit check
-        # RUSTSEC-2026-0001: https://rustsec.org/advisories/RUSTSEC-2026-0001.html
-        # underlying rkyv is patched, but rustsec database not yet updated
-        # Can remove when this is merged: https://github.com/rustsec/advisory-db/pull/2565
-        run: cargo audit --ignore RUSTSEC-2026-0001
+        # Note: you can ignore specific RUSTSEC issues using the `--ignore` flag ,for example:

Review Comment:
   This is added in https://github.com/apache/datafusion/pull/19657, but unecessary as this PR removes the dependency on rkyv



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2664888264


##########
Cargo.lock:
##########
@@ -1203,29 +1180,6 @@ dependencies = [
  "syn 2.0.113",
 ]
 
-[[package]]

Review Comment:
   rust_decimal has many dependencies it turns out, so removing it results in quite a few less dependencies in datafusion



##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -351,58 +342,66 @@ impl sqllogictest::AsyncDB for Postgres {
     }
 }
 
-fn convert_rows(rows: &[Row]) -> Vec<Vec<String>> {
-    rows.iter()
+fn convert_rows(types: &[Type], messages: &[SimpleQueryMessage]) -> Vec<Vec<String>> {
+    messages
+        .iter()
+        .filter_map(|message| match message {
+            SimpleQueryMessage::Row(row) => Some(row),
+            _ => None,
+        })
         .map(|row| {
-            row.columns()
+            types
                 .iter()
                 .enumerate()
-                .map(|(idx, column)| cell_to_string(row, column, idx))
+                .map(|(idx, column_type)| cell_to_string(row, column_type, idx))
                 .collect::<Vec<String>>()
         })
         .collect::<Vec<_>>()
 }
 
-macro_rules! make_string {
-    ($row:ident, $idx:ident, $t:ty) => {{
-        let value: Option<$t> = $row.get($idx);
-        match value {
-            Some(value) => value.to_string(),
-            None => NULL_STR.to_string(),
-        }
-    }};
-    ($row:ident, $idx:ident, $t:ty, $convert:ident) => {{
-        let value: Option<$t> = $row.get($idx);
-        match value {
-            Some(value) => $convert(value).to_string(),
-            None => NULL_STR.to_string(),
-        }
-    }};
-}
-
-fn cell_to_string(row: &Row, column: &Column, idx: usize) -> String {
-    match column.type_().clone() {
-        Type::CHAR => make_string!(row, idx, i8),
-        Type::INT2 => make_string!(row, idx, i16),
-        Type::INT4 => make_string!(row, idx, i32),
-        Type::INT8 => make_string!(row, idx, i64),
-        Type::NUMERIC => make_string!(row, idx, Decimal, decimal_to_str),
-        Type::DATE => make_string!(row, idx, NaiveDate),
-        Type::TIME => make_string!(row, idx, NaiveTime),
-        Type::TIMESTAMP => {
-            let value: Option<NaiveDateTime> = row.get(idx);
-            value
-                .map(|d| format!("{d:?}"))
-                .unwrap_or_else(|| "NULL".to_string())
+fn cell_to_string(row: &SimpleQueryRow, column_type: &Type, idx: usize) -> String {
+    // simple_query returns text values, so we parse by Postgres type to keep

Review Comment:
   Left in `unwrap()` so we fail fast in case there is some problem converting



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] Remove dependency on `rust_decimal`, remove ignore of `RUSTSEC-2026-0001` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #19666:
URL: https://github.com/apache/datafusion/pull/19666#discussion_r2666241594


##########
datafusion/sqllogictest/src/engines/postgres_engine/mod.rs:
##########
@@ -299,8 +297,15 @@ impl sqllogictest::AsyncDB for Postgres {
             self.pb.inc(1);
             return Ok(DBOutput::StatementComplete(0));
         }
+        let statement = self.get_client().prepare(sql).await?;
+        let types: Vec<Type> = statement
+            .columns()
+            .iter()
+            .map(|c| c.type_().clone())
+            .collect();
+
         let start = Instant::now();
-        let rows = self.get_client().query(sql, &[]).await?;
+        let messages = self.get_client().simple_query(sql).await?;

Review Comment:
   yes, you are right -- I will fix



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org