Foreign Table Type Mapping

This guide provides essential data type mappings between external data sources and Tacnode for foreign table operations.

ORC and Parquet Type Mapping

External TypeTacnode TypeNotes
BOOLEANBOOLEANDirect mapping
TINYINTSMALLINTPromoted for compatibility
SMALLINTSMALLINTDirect mapping
INTINTEGERDirect mapping
BIGINTBIGINTDirect mapping
FLOATREALDirect mapping
DOUBLEDOUBLE PRECISIONDirect mapping
DECIMAL(p,s)DECIMAL(p,s)Precision preserved
STRINGTEXTVariable length text
VARCHAR(n)VARCHAR(n)Length preserved
CHAR(n)CHAR(n)Fixed length preserved
BINARYBYTEABinary data mapping
TIMESTAMPTIMESTAMPDirect mapping
DATEDATEDirect mapping
ARRAY<type>type[]Array element type mapped
MAPNot AvailableComplex type not supported
STRUCTNot AvailableComplex type not supported

Delta Lake Type Mapping

External TypeTacnode TypeNotes
booleanBOOLEANDirect mapping
shortSMALLINTDirect mapping
integerINTEGERDirect mapping
longBIGINTDirect mapping
floatREALDirect mapping
doubleDOUBLE PRECISIONDirect mapping
decimal(p,s)DECIMAL(p,s)Precision preserved
stringTEXTVariable length text
varchar(n)VARCHAR(n)Length preserved
char(n)CHAR(n)Fixed length preserved
binaryBYTEABinary data mapping
dateDATEDirect mapping
timestampTIMESTAMPDirect mapping
array<type>type[]Array element type mapped
mapNot AvailableComplex type not supported
structNot AvailableComplex type not supported

Apache Iceberg Type Mapping

External TypeTacnode TypeNotes
booleanBOOLEANDirect mapping
intINTEGER32-bit signed integer
longBIGINT64-bit signed integer
floatREAL32-bit IEEE 754 floating point
doubleDOUBLE PRECISION64-bit IEEE 754 floating point
decimal(p,s)DECIMAL(p,s)Precision preserved
dateDATEDirect mapping
timeTIMEMicrosecond precision
timestampTIMESTAMPMicrosecond precision
timestamptzTIMESTAMPTZTimestamp with timezone
stringTEXTVariable length text
uuidUUIDDirect mapping
fixed(L)BYTEAFixed-length binary
binaryBYTEAVariable-length binary
list<type>type[]Array element type mapped
map<K,V>Not AvailableComplex type not supported
structNot AvailableComplex type not supported

Important Notes

Complex Types: MAP and STRUCT types are not supported in foreign tables. Tables containing these types may require preprocessing or schema flattening.

Array Types: Only simple arrays are supported. Array element types are recursively mapped according to the rules above.

Precision Preservation: DECIMAL types maintain their precision and scale parameters when supported by the underlying storage format.

Workarounds: For complex types, consider:

  • Flattening nested structures during data preparation
  • Using alternative serialization formats
  • Preprocessing data to extract only supported column types

On this page