Skip to content

Commit

Permalink
[Coral-Trino] Fix redundant transforms/casts from GenericProjectTrans…
Browse files Browse the repository at this point in the history
…former (linkedin#512)

* fix redundant transforms/casts

* spotless

* fix fuzzyunionsqlrewriter incorrect struct type when building structs

* remove unused

* spotless

* spotless
  • Loading branch information
KevinGe00 authored Jul 16, 2024
1 parent 185b9ac commit f93b1c3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2019-2023 LinkedIn Corporation. All rights reserved.
* Copyright 2019-2024 LinkedIn Corporation. All rights reserved.
* Licensed under the BSD-2 Clause license.
* See LICENSE in the project root for license information.
*/
Expand Down Expand Up @@ -237,7 +237,8 @@ private RelDataType getUnionDataType(final List<RelDataType> dataTypes) {
if (baseDataType.isStruct()) {
// Build the common UNION type using the first branch that appears in the query
final RelDataTypeFactory.Builder builder =
new RelDataTypeFactory.Builder(toRelConverter.getRelBuilder().getTypeFactory());
new RelDataTypeFactory.Builder(toRelConverter.getRelBuilder().getTypeFactory())
.kind(baseDataType.getStructKind());

// Build a set of common fields by name in the given dataTypes
Set<String> commonFieldNames =
Expand Down

0 comments on commit f93b1c3

Please sign in to comment.