Skip to content

Teradata connector fix#65

Open
sc250072 wants to merge 27 commits intomasterfrom
teradata-connector-fix
Open

Teradata connector fix#65
sc250072 wants to merge 27 commits intomasterfrom
teradata-connector-fix

Conversation

@sc250072
Copy link
Copy Markdown
Collaborator

Description

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

## Section
* Fix some things. ({issue}`issuenumber`)

@github-actions github-actions bot added the docs label Mar 25, 2026
@sc250072 sc250072 force-pushed the teradata-connector-fix branch from 82ca04d to a6c245b Compare March 25, 2026 12:59
@sc250072 sc250072 force-pushed the teradata-connector-fix branch from 6235bcd to 6ae0ba3 Compare March 25, 2026 14:36
findepi and others added 23 commits March 25, 2026 17:11
HMS API can evolve. Adding new statistics type should be a backwards
compatible change. Inability to infer statistics for such column is
better than failing.
Hive uses -1 as the Thrift metastore sentinel value for tables that are
not bucketed. Leaving the StorageDescriptor default of 0 can lead to
divergent behavior for unbucketed tables created by Trino.

Set numBuckets to -1 before applying bucket properties, and add unit
tests covering both the unbucketed sentinel case and the normal
bucketed-table case.
Fix test data that was accepted by ESRI but rejected by JTS which
strictly enforces the OGC Simple Features Specification:

- Close polygon rings (first point must equal last point)
- Fix single-point LINESTRING to have two points (minimum required)
- Fix MULTILINESTRING EMPTY syntax (remove extra parentheses)
- Replace invalid MULTIPOLYGON with overlapping polygons using ST_Union
- Replace degenerate polygons in GEOMETRYCOLLECTION with valid geometries
Adds assertSpatialEquals helper to TestGeoFunctions that uses
stEquals for geometry comparison. Converts testSTGeometryType
and testSTBuffer to use the new helper.

testSTBuffer was updated to use property-based assertions (ST_Envelope
and ST_Area with tolerance) instead of exact WKT coordinate matching.
This makes the tests stable across CPU architectures (ARM vs x86)
where trigonometric functions can produce slightly different
floating-point results.
Migrate simple geometry functions to use JTS library.

Test updates for behavior differences:
- ST_Boundary returns LINESTRING instead of MULTILINESTRING for simple polygons
- ST_Buffer with infinity returns POLYGON EMPTY instead of MULTIPOLYGON EMPTY
- Minor floating-point precision differences in some calculations
Migrate ST_NumPoints and related accessor functions to JTS.

Test updates for behavior differences:
- ST_NumPoints now counts closing vertices in polygons per OGC standard
- Ring vertex ordering may differ cosmetically (same geometry)
Add JTS-compatible overloads for geometry utility methods to support
incremental migration from ESRI to JTS. The ESRI versions remain for
existing callers until they are converted.
Rewrite stUnion to use JTS UnaryUnionOp instead of ESRI cursors.

Behavior differences:
- Point-on-line union does not insert vertices
- Empty inputs return empty geometry collection instead of null
- Migrate spatial join operator to JTS for intersection and
  containment tests
- Switch GeoFunctions envelope operations to use JTS Envelope
  (deserializeEnvelope, ST_XMin/XMax/YMin/YMax, ST_IsEmpty)
Use Extended Well-Known Binary (EWKB) format for geometry serialization.
EWKB is the standard used by PostGIS and retains the SRID (Spatial
Reference System Identifier) for coordinate system information.
Note: TestEsriTable's expected values file was converted from Trino's
old internal binary format to WKT. This change cannot be separated
into an earlier commit because the old format's deserializer was
deleted in the EWKB commit, and circular Maven dependencies prevent
adding geospatial as a test dependency to trino-hive.
With ESRI removed JTS objects no longer need fully qualified names
Change the internal representation of geometry values to use JTS
Geometry objects directly, avoiding unnecessary serialization cycles
between function calls.
Bumps the airlift group with 1 update: [io.airlift:airbase](https://github.com/airlift/airbase).


Updates `io.airlift:airbase` from 364 to 365
- [Release notes](https://github.com/airlift/airbase/releases)
- [Changelog](https://github.com/airlift/airbase/blob/master/CHANGES.md)
- [Commits](https://github.com/airlift/airbase/commits)

---
updated-dependencies:
- dependency-name: io.airlift:airbase
  dependency-version: '365'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: airlift
...

Signed-off-by: dependabot[bot] <support@github.com>
@sc250072 sc250072 force-pushed the teradata-connector-fix branch from 6ae0ba3 to fd871dc Compare March 25, 2026 21:19
findepi and others added 2 commits March 25, 2026 22:39
The json_array_get function has a warning that it's broken and may be removed,
but didn't provide guidance on what to use instead. Now recommends using
json_query or json_extract with JSONPath array indexing syntax.
json_extract is on a long-term deprecation path, so only recommend
json_query as the alternative.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sc250072 sc250072 force-pushed the teradata-connector-fix branch from fd871dc to 312d92c Compare March 25, 2026 22:43
Implement Teradata Trino Connector to handle Trino operations on Teradata,
including connector configuration, type mappings, ClearScape integration
for test environments, product tests, and documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants