[ 
https://issues.apache.org/jira/browse/FLINK-39653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079996#comment-18079996
 ] 

Taranpreet Kaur commented on FLINK-39653:
-----------------------------------------

What needs to be changed

  Before:  IndexGeneratorFactory takes List<DataType>, internally extracts 
LogicalType from each
  After:   IndexGeneratorFactory takes List<LogicalType> directly, callers do 
the extraction

  The logic will be identical — the conversion DataType::getLogicalType just 
moved from inside the factory to the callers. The callers are @Internal classes 
that already depend on DataType, so there's no violation there.
  The factory's public method signature now only exposes LogicalType, which 
satisfies the architecture rule.

  In short

  It's a API boundary enforcement — Flink 2.x requires connectors to only 
expose stable public types in their interfaces.
  LogicalType = stable public API. DataType = evolving API not allowed in 
connector method signatures.

> [Connectors/Opensearch] Move to Flink to 2.0.0 - Fix Violations of ArchUnit 
> architecture rule enforced in Flink 2.x
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-39653
>                 URL: https://issues.apache.org/jira/browse/FLINK-39653
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Opensearch
>            Reporter: Taranpreet Kaur
>            Priority: Major
>             Fix For: opensearch-2.1.0
>
>
> Even after applying the fix in Jira FLINK-37652, the build was failing due to 
> following reason:
>   The Problem
>   - org.apache.flink.table.types.DataType is annotated with @PublicEvolving — 
> but the ArchUnit rule in Flink 2.x treats it
>   as not part of the stable public API that connectors are allowed to depend 
> on in their exposed method signatures.
>   - IndexGeneratorFactory.createIndexGenerator() had List<DataType> as a 
> parameter, which violated this rule.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to