Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
468 commits
Select commit Hold shift + click to select a range
9e51053
Remove unnecessary assertions in TeradataJdbcConnectorTest
sc250072 Sep 3, 2025
b21c42b
Merge branch 'trinodb:master' into master
sc250072 Sep 3, 2025
c2481d5
Merge branch 'trinodb:master' into develop
sc250072 Sep 3, 2025
4eaf0ae
Update teradata.md
dv255037 Sep 3, 2025
5e96bbe
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
c4f7d7d
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
20a69fa
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
d50e77d
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
9070fbe
Update README.md
dv255037 Sep 3, 2025
e436d51
Merge pull request #4 from Teradata/dv255037-patch-1
sc250072 Sep 3, 2025
047e687
Merge pull request #5 from Teradata/dv255037-patch-1-1
sc250072 Sep 3, 2025
7736507
Add Teradata connector documentation and update configuration details
sc250072 Sep 3, 2025
675463d
Merge pull request #25 from Teradata/Fix_for_doc
sc250072 Sep 3, 2025
a27b424
Improve formatting and clarity in README.md for integration test inst…
sc250072 Sep 3, 2025
8b35f18
Enhance documentation in Teradata connector classes with detailed Jav…
sc250072 Sep 3, 2025
eadf5ab
Merge pull request #26 from Teradata/Java_doc
sc250072 Sep 3, 2025
589ce54
Remove unnecessary whitespace in ImplementAvgBigint.java
sc250072 Sep 4, 2025
635a2ca
Merge branch 'trinodb:master' into develop
sc250072 Sep 4, 2025
845369b
Merge branch 'trinodb:master' into master
sc250072 Sep 4, 2025
9b94d5d
Update .gitignore and config.properties for improved plugin management
sc250072 Sep 4, 2025
daa154b
Update config.properties
sc250072 Sep 4, 2025
f2c0704
Update release-353.md
sc250072 Sep 4, 2025
38c0cca
Update config.properties
sc250072 Sep 4, 2025
a0e4e8f
Update config.properties
sc250072 Sep 4, 2025
d01061a
Merge branch 'master' into develop
sc250072 Sep 4, 2025
2fa383b
Merge branch 'master' into develop
sc250072 Sep 9, 2025
12b9302
Removed duplicated code
sc250072 Sep 16, 2025
01a8ce4
Fixed PR workflow reported issues
sc250072 Sep 9, 2025
3ab2dca
Fixed github error prone check issues
sc250072 Sep 9, 2025
65ca092
Added token to JWT authentication mechanism
sc250072 Sep 12, 2025
de5f156
Implement projection function rewriting for LOWER function in Teradata
sc250072 Sep 12, 2025
8ca39ab
Changes as per PR comments
db255099 Sep 17, 2025
22a13e7
removed if (!this.hasBehavior)
db255099 Sep 17, 2025
84a4499
Added Comments for overrides
db255099 Sep 17, 2025
0cfd5e3
Removed AbstractTeradataJDBCTest.java
db255099 Sep 17, 2025
5c9b200
fix envName in constructor
db255099 Sep 18, 2025
906a458
Added createQueryRunner()
db255099 Sep 18, 2025
f8ad3c7
Remove Empty Lines
db255099 Sep 23, 2025
fc26cf9
Removed Comments
db255099 Sep 23, 2025
17e024b
Parameters on separate lines
db255099 Sep 23, 2025
3234d64
Remove abbreviations
db255099 Sep 23, 2025
2521efd
Removed Unnecessary Comments
db255099 Sep 23, 2025
5c72e03
Changes as per PR comments
db255099 Sep 17, 2025
6acddc7
Refactor DatabaseConfigFactory and update dependencies in pom.xml
sc250072 Sep 24, 2025
98aec4f
addressed trino pr review comments
sc250072 Sep 26, 2025
f3a6609
Merge branch 'trinodb:master' into SplitingPR
sc250072 Sep 26, 2025
af24d1a
Updated as per latest trino version
sc250072 Sep 28, 2025
8f46342
Initial setup
sc250072 Jun 17, 2025
6ac3f89
Streamlined Teradata plugin, added DEW tests, and integrated with Tri…
sc250072 Jun 30, 2025
eac4449
Trying to deploy teradata plugin as plugin
sc250072 Jun 30, 2025
16b8bb7
Added support of copying tables from tpch to Teradata
sc250072 Jul 1, 2025
cb659ac
Initial setup
sc250072 Jun 17, 2025
580dc28
Streamlined Teradata plugin, added DEW tests, and integrated with Tri…
sc250072 Jun 30, 2025
f3a2bf4
Trying to deploy teradata plugin as plugin
sc250072 Jun 30, 2025
1405c09
Added support of copying tables from tpch to Teradata
sc250072 Jul 1, 2025
94e6efd
Implemented Expression Rewriter rules
sc250072 Jul 7, 2025
de7e3c3
Added support and not supported operations
sc250072 Jul 7, 2025
c8393cc
resolved the issue with the test case testCreateSchemaWithLongName
dv255037 Jul 8, 2025
6389970
Top N implemented
sc250072 Jul 9, 2025
28b130d
Made modifications for resolving testCreateSchemaWithLongName testcas…
dv255037 Jul 8, 2025
df789a2
added an error message to throw in acse of drop_Schema_Cascade
dv255037 Jul 9, 2025
74ee283
drop table and create table with comments
db255099 Jul 10, 2025
e4f3314
Updated with other branches
sc250072 Jul 10, 2025
8901c2c
Join Pushdown implemented
sc250072 Jul 11, 2025
e423ef3
fixed coupe of test cases
sc250072 Jul 13, 2025
a651c57
Implemented JOin pushdown
sc250072 Jul 14, 2025
f054848
test
sc250072 Jul 15, 2025
b207185
testNullSensitiveTopNPushdown issue fixed
sc250072 Jul 15, 2025
60964f6
overridden rename schema to throw an expected error
dv255037 Jul 9, 2025
cf52e3b
Update TeradataClient.java
dv255037 Jul 10, 2025
6961593
Update TeradataClient.java
dv255037 Jul 10, 2025
9ff5fb6
Mreged code from interns
sc250072 Jul 15, 2025
7300835
Fixed native and added suport to aggregatvive
sc250072 Jul 15, 2025
66c88fb
added
sc250072 Jul 21, 2025
9adafce
aggregation tests
sc250072 Jul 15, 2025
14e8638
testCreateTableWithLongColumnName test case fixed
sc250072 Jul 19, 2025
2b0bbd6
Fixed Join Pushdown issue
sc250072 Jul 22, 2025
006d93c
Fix for testCaseSensitiveAggregationPushdown
sc250072 Jul 22, 2025
2070d66
fixed testComplexJoinPushdown test case
sc250072 Jul 22, 2025
aff7552
testCaseSensitiveTopNPushdown issue fixed
sc250072 Jul 22, 2025
10de65d
Fixed testCreateTableAsSelect test case
sc250072 Jul 23, 2025
7ca3b8c
Fixed testAggregationPushdown test case
sc250072 Jul 23, 2025
dfdd868
testArithmeticPredicatePushdown test case fixed
sc250072 Jul 23, 2025
7ed22e5
Fixed few test cases and applied checkstyle
sc250072 Jul 27, 2025
806e536
Update TeradataJdbcConnectorTest.java
db255099 Jul 17, 2025
e86cffb
jsonColumnMapping fixes
db255099 Jul 25, 2025
681021b
Fixed few test cases and applied checkstyle
sc250072 Jul 30, 2025
d7dee6b
Fixed few test cases and applied checkstyle
sc250072 Jul 31, 2025
5dd2dab
modified for the testcase testCreateTableWithLongTableName
dv255037 Jul 16, 2025
d194ae9
Update TeradataJdbcConnectorTest.java
dv255037 Jul 16, 2025
ab40df8
Update TeradataJdbcConnectorTest.java
dv255037 Jul 16, 2025
3b6683d
Add ClearScape integration tests and updates
dv255037 Jul 28, 2025
daf98f9
Add ClearScape integration tests and updates
dv255037 Jul 28, 2025
141ff5c
commit
dv255037 Jul 28, 2025
2d0afbb
commit
dv255037 Jul 28, 2025
942f427
commit
dv255037 Jul 28, 2025
629f70a
commit
dv255037 Jul 28, 2025
75d758b
commit
dv255037 Jul 28, 2025
c662233
commit
dv255037 Jul 28, 2025
48dc256
commit
dv255037 Jul 28, 2025
7a74e38
yes
dv255037 Jul 28, 2025
64c5613
commit
dv255037 Jul 28, 2025
e759196
commit
dv255037 Jul 28, 2025
1e8df48
commit
dv255037 Jul 28, 2025
0f5fe0c
commit
dv255037 Jul 28, 2025
5c00d31
commit
dv255037 Jul 28, 2025
300581f
commit
dv255037 Jul 28, 2025
b27d01a
commit
dv255037 Jul 28, 2025
252a325
commit
dv255037 Jul 28, 2025
5ee0c67
commit
dv255037 Jul 28, 2025
be1e671
commit
dv255037 Jul 28, 2025
6138993
commit
dv255037 Jul 28, 2025
95ffffd
commit
dv255037 Jul 28, 2025
59ae2bd
commit
dv255037 Jul 28, 2025
ec18317
commit
dv255037 Jul 28, 2025
fa8c4bb
commit
dv255037 Jul 28, 2025
ec4fac8
commit
dv255037 Jul 28, 2025
264d5d3
commit
dv255037 Jul 28, 2025
9ee2ae1
commit
dv255037 Jul 28, 2025
2afde29
commit
dv255037 Jul 28, 2025
fe6fc03
commit
dv255037 Jul 28, 2025
c480b6e
commit
dv255037 Jul 28, 2025
bf91346
commit
dv255037 Jul 28, 2025
8942285
commit
dv255037 Jul 28, 2025
f17e0ca
commit
dv255037 Jul 28, 2025
e41ece3
commit
dv255037 Jul 28, 2025
b320050
Clearscape Integration
dv255037 Jul 29, 2025
ec124d8
Clearscape Integration
dv255037 Jul 30, 2025
f2d445a
Refactored clearscape code
sc250072 Aug 4, 2025
1c95e75
Refactored clearscape code
sc250072 Aug 4, 2025
8f589c1
Refactored clearscape code
sc250072 Aug 4, 2025
3f8e43d
Added ClearScape Manager
sc250072 Aug 6, 2025
8eea508
Latest code changes to handle Real, timestamp datatypes in write
sc250072 Aug 6, 2025
5ce78ff
Code refactored
sc250072 Aug 6, 2025
d665133
Refactored the code and resolved pom issue with com.fasterxml.jackson…
sc250072 Aug 6, 2025
d24f6b8
Refactored the code and resolved pom issue with com.fasterxml.jackson…
sc250072 Aug 6, 2025
52cd1b6
create base branch for upcoming feature development
sc250072 Aug 20, 2025
98b9096
Fixed bugs for case sensitivity in LIKE expressions and implement COU…
dv255037 Aug 20, 2025
4fca69d
Java Documentation for all the newly created methods in the Clearscap…
dv255037 Aug 20, 2025
ea3b3b1
Added support to JWT authentication mechanism in trino-teradata conne…
dv255037 Aug 20, 2025
670aa56
Add ClearScape integration tests and updates
dv255037 Jul 28, 2025
dec311b
Add ClearScape integration tests and updates
dv255037 Jul 28, 2025
3fbed37
commit
dv255037 Jul 28, 2025
4aa29e4
commit
dv255037 Jul 28, 2025
78c71f3
commit
dv255037 Jul 28, 2025
2f6f947
commit
dv255037 Jul 28, 2025
ff69d74
commit
dv255037 Jul 28, 2025
41de213
commit
dv255037 Jul 28, 2025
591705f
commit
dv255037 Jul 28, 2025
d6af947
yes
dv255037 Jul 28, 2025
00f9d82
commit
dv255037 Jul 28, 2025
843a979
commit
dv255037 Jul 28, 2025
ba01d70
commit
dv255037 Jul 28, 2025
6c2685b
commit
dv255037 Jul 28, 2025
81be59e
commit
dv255037 Jul 28, 2025
4d0f130
commit
dv255037 Jul 28, 2025
4e084fa
commit
dv255037 Jul 28, 2025
6c80c1b
commit
dv255037 Jul 28, 2025
53cb598
commit
dv255037 Jul 28, 2025
5b36cfa
commit
dv255037 Jul 28, 2025
6735d43
commit
dv255037 Jul 28, 2025
c4fc3c2
commit
dv255037 Jul 28, 2025
6ccdc7b
commit
dv255037 Jul 28, 2025
a33b432
commit
dv255037 Jul 28, 2025
8da7f44
commit
dv255037 Jul 28, 2025
2c8fcc4
commit
dv255037 Jul 28, 2025
bb66d7d
commit
dv255037 Jul 28, 2025
7016611
commit
dv255037 Jul 28, 2025
94f5e54
commit
dv255037 Jul 28, 2025
768cbaa
commit
dv255037 Jul 28, 2025
6e6b237
commit
dv255037 Jul 28, 2025
23bb835
commit
dv255037 Jul 28, 2025
fa25059
commit
dv255037 Jul 28, 2025
e9491dd
commit
dv255037 Jul 28, 2025
4ebc93f
commit
dv255037 Jul 28, 2025
b6731df
Clearscape Integration
dv255037 Jul 29, 2025
7f83860
Clearscape Integration
dv255037 Jul 30, 2025
fb141d5
Refactored clearscape code
sc250072 Aug 4, 2025
fad12e3
Clearscape Integration
dv255037 Aug 5, 2025
33a4eb2
Clearscape Integration
dv255037 Aug 5, 2025
7e901d6
Clearscape Integration
dv255037 Aug 5, 2025
8501485
commit
dv255037 Aug 6, 2025
59c8536
Java Documentation for all the newly created methods in the Clearscap…
dv255037 Aug 20, 2025
1576533
Java Documentation for all the newly created methods in the Clearscap…
dv255037 Aug 20, 2025
fdedae9
Implemented Secret authentication mechanism
db255099 Aug 20, 2025
36f6a9f
IDE-25193 Bearer Authentication
db255099 Aug 20, 2025
bd7d946
IDE-25206 String Pushdown
db255099 Aug 20, 2025
fe2b1a7
time with timezone
db255099 Aug 1, 2025
6d49694
Fixed imports
db255099 Aug 4, 2025
2becc47
Array as varchar
db255099 Aug 4, 2025
708ffe1
ArrayMapping
db255099 Jul 28, 2025
c0df8c9
number column mapping
db255099 Jul 30, 2025
c9fe289
character Mapping
db255099 Jul 30, 2025
5536b4d
time with timezone
db255099 Aug 1, 2025
823bde6
Fixed imports
db255099 Aug 4, 2025
9dbb213
Array as varchar
db255099 Aug 4, 2025
54ce4ce
Fixed checkstyle errors
db255099 Aug 12, 2025
a6aa6cc
removed redundant code
db255099 Aug 18, 2025
fac7c2f
Removed SOP statement
db255099 Aug 20, 2025
bcc0cfc
Refactored the test code for more readability and reusability
sc250072 Aug 21, 2025
b260c7c
Add Apache License header to all Java files
sc250072 Aug 22, 2025
921ad9c
Removed not required folder
sc250072 Aug 22, 2025
46e2c26
Removed license maven plugin skip configuration as license header is …
sc250072 Aug 22, 2025
5f757fe
Fixed Textual Aggregation pushdown issues
sc250072 Aug 22, 2025
e612b25
pom sort issue fixed
sc250072 Aug 22, 2025
7b1d1d5
testCaseSensitiveAggregationPushdown test failure issue resolved
sc250072 Aug 22, 2025
1602da3
Refactor package structure and add unit tests for Teradata integration
sc250072 Aug 27, 2025
5f05bec
Removed jacoco plugin added for code coverage. It is not working. Nee…
sc250072 Aug 27, 2025
39f7b37
Sorted the pom
sc250072 Aug 27, 2025
7c38b88
Remove deprecated methods and refactor OIDC configuration handling
sc250072 Aug 27, 2025
356b77b
Refactor cleanup logic and simplify connection closing in ClearScapeS…
sc250072 Aug 28, 2025
5c91312
Update unit test assertions in TestTeradataConfig to check for null v…
sc250072 Aug 28, 2025
a7133e6
Timezone issue fixed
sc250072 Sep 2, 2025
3e1c94a
Remove unnecessary assertions in TeradataJdbcConnectorTest
sc250072 Sep 3, 2025
c4999d3
Create README.md
dv255037 Aug 19, 2025
36a31c6
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
b129fa0
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
41eb142
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
3c6f595
Update plugin/trino-teradata/README.md
dv255037 Sep 3, 2025
c551542
Update README.md
dv255037 Sep 3, 2025
2c9ae5e
Create teradata.md
dv255037 Aug 19, 2025
db83830
Update teradata.md
dv255037 Sep 3, 2025
137e483
Add Teradata connector documentation and update configuration details
sc250072 Sep 3, 2025
d41b047
Improve formatting and clarity in README.md for integration test inst…
sc250072 Sep 3, 2025
d8edbc4
Enhance documentation in Teradata connector classes with detailed Jav…
sc250072 Sep 3, 2025
bf35abc
Remove unnecessary whitespace in ImplementAvgBigint.java
sc250072 Sep 4, 2025
a3d345d
Update .gitignore and config.properties for improved plugin management
sc250072 Sep 4, 2025
f15fe06
Update config.properties
sc250072 Sep 4, 2025
d799d70
Update release-353.md
sc250072 Sep 4, 2025
c280e59
Update config.properties
sc250072 Sep 4, 2025
42ea8d8
Update config.properties
sc250072 Sep 4, 2025
63f99f9
Removed duplicated code
sc250072 Sep 16, 2025
ec73595
Implement projection function rewriting for LOWER function in Teradata
sc250072 Sep 12, 2025
acfd54c
Changes as per PR comments
db255099 Sep 17, 2025
1a4d817
removed if (!this.hasBehavior)
db255099 Sep 17, 2025
0d0ea32
Added Comments for overrides
db255099 Sep 17, 2025
c5ce5ac
Removed AbstractTeradataJDBCTest.java
db255099 Sep 17, 2025
82053b6
fix envName in constructor
db255099 Sep 18, 2025
08dc208
Added createQueryRunner()
db255099 Sep 18, 2025
2cc95a3
Remove Empty Lines
db255099 Sep 23, 2025
e84b7eb
Removed Comments
db255099 Sep 23, 2025
d73cd65
Parameters on separate lines
db255099 Sep 23, 2025
7bd762e
Remove abbreviations
db255099 Sep 23, 2025
6a4ea0c
Removed Unnecessary Comments
db255099 Sep 23, 2025
5afaab4
Changes as per PR comments
db255099 Sep 17, 2025
edd20d2
Refactor DatabaseConfigFactory and update dependencies in pom.xml
sc250072 Sep 24, 2025
6006ee9
addressed trino pr review comments
sc250072 Sep 26, 2025
e168072
Updated as per latest trino version
sc250072 Sep 28, 2025
1dd3da0
Merge remote-tracking branch 'origin/SplitingPR' into SplitingPR
sc250072 Sep 28, 2025
fc89e05
Fix formatting and improve clarity in Teradata connection documentation
sc250072 Sep 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .idea/icon.png
Binary file not shown.
1,057 changes: 517 additions & 540 deletions core/trino-parser/src/main/java/io/trino/sql/parser/AstBuilder.java

Large diffs are not rendered by default.

319 changes: 85 additions & 234 deletions docs/src/main/sphinx/connector/teradata.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@
<img src="../_static/img/teradata.png" class="connector-logo">
```

The Teradata connector allows querying and creating tables in an external Teradata database.
This can be used to join data between different systems like Teradata and Hive, or between different Teradata instances.
The Teradata connector allows querying and creating tables in an external
[Teradata](https://www.teradata.com/) database. This can be used to join
data between different systems like Teradata and Hive, or between different Teradata instances.

## Requirements

To connect to Teradata, you need:

- Teradata Database
- Network access from the Trino coordinator and workers to Teradata. Port 1025 is the default port
- Network access from the Trino coordinator and workers to Teradata. Port
1025 is the default port

## Configuration

To configure the Teradata connector, create a catalog properties file in `etc/catalog` named, for example, `teradata.properties`, to mount the Teradata connector as the `teradata`
catalog. Create the file with the following contents, replacing the connection properties as appropriate for your setup:
To configure the Teradata connector, create a catalog properties file in
`etc/catalog` named, for example, `teradata.properties`, to mount the Teradata
connector as the `teradata` catalog. Create the file with the following
contents, replacing the connection properties as appropriate for your setup:

```properties
connector.name=teradata
Expand All @@ -26,21 +30,26 @@ connection-user=***
connection-password=***
```

The `connection-url` defines the connection information and parameters to pass to the Teradata JDBC driver. The supported parameters for the URL are available in
the [Teradata JDBC documentation](https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html#BABJIHBJ).

For example, the following `connection-url` configures character encoding, transaction mode, and authentication.
The `connection-url` defines the connection information and parameters to pass
to the Teradata JDBC driver. The supported parameters for the URL are
available in the
[Teradata JDBC documentation](https://teradata-docs.s3.amazonaws.com/doc/connectivity/jdbc/reference/current/jdbcug_chapter_2.html#BABJIHBJ).
For example, the following `connection-url` configures character encoding,
transaction mode, and authentication.

```properties
connection-url=jdbc:teradata://example.teradata.com/CHARSET=UTF8,TMODE=ANSI,LOGMECH=TD2
```

The `connection-user` and `connection-password` are typically required and determine the user credentials for the connection, often a service user.
The `connection-user` and `connection-password` are typically required and
determine the user credentials for the connection, often a service user.

### Connection security

If you have TLS configured with a globally-trusted certificate installed on your data source, you can enable TLS between your cluster and the data source by appending parameters to
the JDBC connection string set in the connection-url catalog configuration property.
If you have TLS configured with a globally-trusted certificate installed on
your data source, you can enable TLS between your cluster and the data
source by appending parameters to the JDBC connection string set in the
connection-url catalog configuration property.

For example, to specify SSLMODE:

Expand All @@ -56,15 +65,18 @@ Teradata [JDBC documentation](https://teradata-docs.s3.amazonaws.com/doc/connect

### Multiple Teradata databases

You can have as many catalogs as you need, so if you have additional Teradata databases, simply add another properties file to etc/catalog with a different name, making sure it
ends in .properties. For example, if you name the property file sales.properties, Trino creates a catalog named sales using the configured connector.
You can have as many catalogs as you need, so if you have additional Teradata
databases, simply add another properties file to etc/catalog with a different
name, making sure it ends in .properties.
For example, if you name the property file sales.properties, Trino creates a
catalog named sales using the configured connector.

## Type mapping

Because Trino and Teradata each support types that the other does not, this
connector {ref}`modifies some types <type-mapping-overview>` when reading data.
Refer to the following sections for type mapping in when reading data from Teradata
to Trino.
Refer to the following sections for type mapping in when reading data from
Teradata to Trino.

### Teradata type to Trino type mapping

Expand All @@ -75,144 +87,53 @@ this table:
:widths: 30, 30, 40
:header-rows: 1

*
- Teradata type
- Trino type
- Notes
*
- `TINYINT`
- `TINYINT`
-

*
- `SMALLINT`

- `SMALLINT`
-

*
- `INTEGER`

- `INTEGER`
-

*
- `BIGINT`

- `BIGINT`
-

*
- `REAL`

- `DOUBLE`
-

*
- `DOUBLE`

- `DOUBLE`
-

*
- `FLOAT`

- `DOUBLE`
-

*
- `NUMBER(p, s)`

- `DECIMAL(p, s)`
- `DECIMAL(p, s)` is an alias of `NUMERIC(p, s)`. See
[](postgresql-decimal-type-handling) for more information.

*
- `NUMERIC(p, s)`

- `DECIMAL(p, s)`
- `DECIMAL(p, s)` is an alias of `NUMERIC(p, s)`. See
[](postgresql-decimal-type-handling) for more information.

*
- `DECIMAL(p, s)`

- `DECIMAL(p, s)`
- `DECIMAL(p, s)` is an alias of `NUMERIC(p, s)`. See
[](postgresql-decimal-type-handling) for more information.

*
- `CHAR(n)`

- `CHAR(n)`
-

*
- `CHARACTER(n)`

- `CHAR(n)`
-

*
- `VARCHAR(n)`

- `VARCHAR(n)`
-

*
- `BINARY`

- `VARBINARY`
-

*
- `VARBINARY`

- `VARBINARY`
-

*
- `BLOB`

- `VARBINARY`
-

*
- `DATE`

- `DATE`
-

*
- `TIME(n)`

- `TIME(n)`
-

*
- `TIMESTAMP(n)`

- `TIMESTAMP(n)`
-

*
- `TIMESTAMP(n) WITH TIME ZONE`

- `TIMESTAMP(n) WITH TIME ZONE`
-

*
- `TIME(n) WITH TIME ZONE`

- `TIME(n) WITH TIME ZONE`
-

*
- `JSON`

- `JSON`
-

* - Teradata type
- Trino type
- Notes
* - `TINYINT`
- `TINYINT`
-
* - `SMALLINT`
- `SMALLINT`
-
* - `INTEGER`
- `INTEGER`
-
* - `BIGINT`
- `BIGINT`
-
* - `REAL`
- `DOUBLE`
-
* - `DOUBLE`
- `DOUBLE`
-
* - `FLOAT`
- `DOUBLE`
-
* - `NUMBER(p, s)`
- `DECIMAL(p, s)`
- `DECIMAL(p, s)` is an alias of `NUMERIC(p, s)`. See
[](teradata-decimal-type-handling) for more information.
* - `NUMERIC(p, s)`
- `DECIMAL(p, s)`
- `DECIMAL(p, s)` is an alias of `NUMERIC(p, s)`. See
[](teradata-decimal-type-handling) for more information.
* - `DECIMAL(p, s)`
- `DECIMAL(p, s)`
- `DECIMAL(p, s)` is an alias of `NUMERIC(p, s)`. See
[](postgresql-decimal-type-handling) for more information.
* - `CHAR(n)`
- `CHAR(n)`
-
* - `CHARACTER(n)`
- `CHAR(n)`
-
* - `VARCHAR(n)`
- `VARCHAR(n)`
* - `DATE`
- `DATE`
-
:::

No other types are supported.
Expand All @@ -222,19 +143,22 @@ No other types are supported.

## Querying Teradata

The Teradata connector provides a schema for every Teradata database. You can see the available Teradata databases by running SHOW SCHEMAS:
The Teradata connector provides a schema for every Teradata database. You can
see the available Teradata databases by running SHOW SCHEMAS:

```
SHOW SCHEMAS FROM teradata;
```

If you have a Teradata database named sales, you can view the tables in this database by running SHOW TABLES:
If you have a Teradata database named sales, you can view the tables in this
database by running SHOW TABLES:

```
SHOW TABLES FROM teradata.sales;
```

You can see a list of the columns in the orders table in the sales database using either of the following:
You can see a list of the columns in the orders table in the sales database
using either of the following:

```
DESCRIBE teradata.sales.orders;
Expand All @@ -249,81 +173,8 @@ SELECT * FROM teradata.sales.orders;

## SQL support

The connector provides read access to data and metadata in the Teradata database. In addition to
the [globally available](https://trino.io/docs/current/language/sql-support.html#globally-available-statements)
and [read operation](https://trino.io/docs/current/language/sql-support.html#read-operations) statements, the connector supports the following features:

## Performance

The connector includes a number of performance improvements, detailed in the following sections.

### Table statistics

The Teradata connector can use [table and column statistics](https://trino.io/docs/current/optimizer/statistics.html)
for [cost based optimizations](https://trino.io/docs/current/optimizer/cost-based-optimizations.html), to improve query processing performance based on the actual data in the data
source.
The statistics are collected by Teradata and retrieved by the connector. The table and column statistics are based on Teradata's Data Dictionary views.

You can update statistics in Teradata by running:

```
COLLECT STATISTICS COLUMN (regionkey), COLUMN (name) ON trino_test_teradatajdbcconnect.nation;
```

Please refer to [Statistics](https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/SQL-Data-Definition-Language-Syntax-and-Examples/Statistics-Statements) for more information
on Table Statistics.

### Pushdown

The connector supports pushdown for a number of operations:

- {ref}`join-pushdown`
- {ref}`limit-pushdown`
- {ref}`topn-pushdown`

{ref}`Aggregate pushdown <aggregation-pushdown>` for the following functions:

- {func}`avg`
- {func}`count`
- {func}`max`
- {func}`min`
- {func}`sum`
- {func}`stddev`
- {func}`stddev_pop`
- {func}`stddev_samp`
- {func}`variance`
- {func}`var_pop`
- {func}`var_samp`
- {func}`covar_pop`
- {func}`covar_samp`
- {func}`corr`
- {func}`regr_intercept`
- {func}`regr_slope`

```{include} join-pushdown-enabled-true.fragment
```

### Predicate pushdown support

Predicates are pushed down for most types, including `UUID` and temporal
types, such as `DATE`.

The connector does not support pushdown of range predicates, such as `>`,
`<`, or `BETWEEN`, on columns with {ref}`character string types
<string-data-types>` like `CHAR` or `VARCHAR`. Equality predicates, such as
`IN` or `=`, and inequality predicates, such as `!=` on columns with
textual types are pushed down. This ensures correctness of results since the
remote data source may sort strings differently than Trino.

In the following example, the predicate of the first query is not pushed down
since `name` is a column of type `VARCHAR` and `>` is a range predicate.
The other queries are pushed down.

```sql
-- Not pushed down
SELECT * FROM nation WHERE name > 'CANADA';
-- Pushed down
SELECT * FROM nation WHERE name != 'CANADA';
SELECT * FROM nation WHERE name = 'CANADA';
```
The connector provides read access to data and metadata in the Teradata
database. In addition to the [globally available](https://trino.io/docs/current/language/sql-support.html#globally-available-statements)
and [read operation] (https://trino.io/docs/current/language/sql-support.
html#read-operations) statements, the connector supports the following features:

Loading
Loading