Skip to content

Conversation

@ebyhr
Copy link
Member

@ebyhr ebyhr commented Oct 14, 2025

Description

Follow-up of #26573
Fixes #5901

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

Summary by Sourcery

Enhancements:

  • Replace short test table identifiers with longer descriptive names in tests to work around Oracle table name length limitations

@cla-bot cla-bot bot added the cla-signed label Oct 14, 2025
@sourcery-ai
Copy link

sourcery-ai bot commented Oct 14, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors test fixtures to use longer, descriptive table name prefixes across connector and JDBC tests (removing related TODOs) to address Oracle limitations (#5901).

Class diagram for updated test table naming in BaseConnectorTest and BaseConnectorSmokeTest

classDiagram
    class BaseConnectorTest {
        +testCreateTable()
        +testCommentColumnName(columnName, delimited)
        +testDeleteWithComplexPredicate()
        +testDeleteWithSubquery()
        +testDeleteWithSemiJoin()
        +testRowLevelDelete()
    }
    class BaseConnectorSmokeTest {
        +testRowLevelDelete()
    }
    class TestTable {
        +getName()
    }
    BaseConnectorTest --> TestTable : uses
    BaseConnectorSmokeTest --> TestTable : uses

    %% Highlight updated table name usage
    BaseConnectorTest : "tableName = 'test_create_table_not_exists_' + randomNameSuffix()"
    BaseConnectorTest : "newTrinoTable('test_comment_column_name', ...)"
    BaseConnectorTest : "createTestTableForWrites('test_delete_with_complex_predicate_', ...)"
    BaseConnectorTest : "createTestTableForWrites('test_delete_with_subquery', ...)"
    BaseConnectorTest : "createTestTableForWrites('test_delete_with_semijoin', ...)"
    BaseConnectorTest : "newTrinoTable('test_row_level_delete', ...)"
    BaseConnectorSmokeTest : "newTrinoTable('test_row_level_delete', ...)"
Loading

File-Level Changes

Change Details Files
Extended table name prefixes in BaseConnectorTest for create, comment, and delete tests
  • testCreateTable uses "test_create_table_not_exists_..."
  • testCommentColumnName uses "test_comment_column_name"
  • multiple delete tests renamed to "test_delete_with_*_..."
  • testRowLevelDelete renamed to "test_row_level_delete"
testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java
Extended table name prefixes in BaseJdbcConnectorTest for delete predicate tests
  • testDeleteWithBigintEqualityPredicate renamed to "test_delete_with_bigint_equality_predicate"
  • varchar equality/inequality tests use "test_delete_with_varchar_*_predicate"
  • greater/lower predicate test renamed to "test_delete_with_varchar_greater_and_lower_predicate"
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java
Extended table name prefix in BaseConnectorSmokeTest for row-level delete
  • testRowLevelDelete renamed to "test_row_level_delete"
testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorSmokeTest.java
Removed outdated TODO comments referencing Oracle version update (#5901)
  • Deleted comments suggesting reversion when Oracle version is updated
  • Cleaned up related TODO annotations across tests
testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorTest.java
plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/BaseJdbcConnectorTest.java
testing/trino-testing/src/main/java/io/trino/testing/BaseConnectorSmokeTest.java

Assessment against linked issues

Issue Objective Addressed Explanation
#5901 Update the Oracle version used in tests from 11g to 12c (or newer) to allow use of long identifiers. The PR only updates test table names to be longer, which was previously blocked by the Oracle 11g identifier length limit. However, there is no evidence in the PR that the Oracle version used in tests has actually been updated to 12c or newer. The core objective of upgrading the Oracle version is not addressed.
#5901 Remove workarounds or TODOs related to short identifier limits in test code.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Consider centralizing table‐name prefix generation into a helper so you don’t have to manually update each test and to enforce consistent length constraints.
  • Double‐check that these longer table names stay within the maximum identifier length supported by your connectors (especially Oracle) to avoid future test failures.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider centralizing table‐name prefix generation into a helper so you don’t have to manually update each test and to enforce consistent length constraints.
- Double‐check that these longer table names stay within the maximum identifier length supported by your connectors (especially Oracle) to avoid future test failures.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ebyhr ebyhr merged commit 3f7fcab into trinodb:master Oct 14, 2025
182 of 185 checks passed
@ebyhr ebyhr deleted the ebi/oracle-test-table-name branch October 14, 2025 23:39
@github-actions github-actions bot added this to the 478 milestone Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Update Oracle version used in tests to 12

2 participants