|
1 | 1 | use std::{str::FromStr, sync::Arc}; |
2 | 2 |
|
3 | | -use arrow::array::{ |
4 | | - timezone::Tz, Array, BinaryArray, BooleanArray, Date32Array, Date64Array, Decimal128Array, |
5 | | - LargeBinaryArray, PrimitiveArray, StringArray, Time32MillisecondArray, Time32SecondArray, |
6 | | - Time64MicrosecondArray, Time64NanosecondArray, TimestampMicrosecondArray, |
7 | | - TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray, |
8 | | -}; |
| 3 | +#[cfg(not(feature = "datafusion"))] |
9 | 4 | use arrow::{ |
| 5 | + array::{ |
| 6 | + timezone::Tz, Array, BinaryArray, BooleanArray, Date32Array, Date64Array, Decimal128Array, |
| 7 | + LargeBinaryArray, PrimitiveArray, StringArray, Time32MillisecondArray, Time32SecondArray, |
| 8 | + Time64MicrosecondArray, Time64NanosecondArray, TimestampMicrosecondArray, |
| 9 | + TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray, |
| 10 | + }, |
10 | 11 | datatypes::{ |
11 | 12 | DataType, Date32Type, Date64Type, Float32Type, Float64Type, Int16Type, Int32Type, |
12 | 13 | Int64Type, Int8Type, Time32MillisecondType, Time32SecondType, Time64MicrosecondType, |
13 | 14 | Time64NanosecondType, TimeUnit, UInt16Type, UInt32Type, UInt64Type, UInt8Type, |
14 | 15 | }, |
15 | 16 | temporal_conversions::{as_date, as_time}, |
16 | 17 | }; |
| 18 | +#[cfg(feature = "datafusion")] |
| 19 | +use datafusion::arrow::{ |
| 20 | + array::{ |
| 21 | + timezone::Tz, Array, BinaryArray, BooleanArray, Date32Array, Date64Array, Decimal128Array, |
| 22 | + LargeBinaryArray, PrimitiveArray, StringArray, Time32MillisecondArray, Time32SecondArray, |
| 23 | + Time64MicrosecondArray, Time64NanosecondArray, TimestampMicrosecondArray, |
| 24 | + TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray, |
| 25 | + }, |
| 26 | + datatypes::{ |
| 27 | + DataType, Date32Type, Date64Type, Float32Type, Float64Type, Int16Type, Int32Type, |
| 28 | + Int64Type, Int8Type, Time32MillisecondType, Time32SecondType, Time64MicrosecondType, |
| 29 | + Time64NanosecondType, TimeUnit, UInt16Type, UInt32Type, UInt64Type, UInt8Type, |
| 30 | + }, |
| 31 | + temporal_conversions::{as_date, as_time}, |
| 32 | +}; |
| 33 | + |
17 | 34 | use bytes::{BufMut, BytesMut}; |
18 | 35 | use chrono::{DateTime, TimeZone, Utc}; |
19 | 36 | use pgwire::api::results::FieldFormat; |
|
0 commit comments