Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ private static boolean isAdditionalReadOverheadTooExpensive(AggregationNode aggr
double subqueriesTotalDataSize = additionalColumnsDataSize * subqueryCount + distinctInputDataSize;

return isNaN(subqueriesTotalDataSize) ||
isNaN(singleTableScanDataSize) ||
// we would read more than 50% more data
subqueriesTotalDataSize / singleTableScanDataSize > 1.5;
isNaN(singleTableScanDataSize) ||
// we would read more than 50% more data
subqueriesTotalDataSize / singleTableScanDataSize > 1.5;
Copy link
Member

Choose a reason for hiding this comment

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

I prefer the previous indentation :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it wasn't aligned to the column (this is the actual indentation IntelliJ will make by default when wrapping a line)

}

private static boolean isSelective(FilterNode filterNode, StatsProvider statsProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ public class GatherPartialTopN
private static boolean isGatherLocalExchange(PlanNode source)
{
return source instanceof ExchangeNode exchange
&& exchange.getScope().equals(LOCAL)
&& exchange.getType().equals(GATHER);
&& exchange.getScope().equals(LOCAL)
&& exchange.getType().equals(GATHER);
}

private static boolean isGatherRemoteExchange(ExchangeNode exchangeNode)
{
return exchangeNode.getScope().equals(REMOTE)
&& exchangeNode.getType().equals(GATHER)
// non-empty orderingScheme means it's a merging exchange
&& exchangeNode.getOrderingScheme().isEmpty();
&& exchangeNode.getType().equals(GATHER)
// non-empty orderingScheme means it's a merging exchange
&& exchangeNode.getOrderingScheme().isEmpty();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public class MultipleDistinctAggregationToMarkDistinct

public static boolean canUseMarkDistinct(AggregationNode aggregationNode)
{
return hasNoDistinctWithFilterOrMask(aggregationNode) &&
(hasMultipleDistincts(aggregationNode) || hasMixedDistinctAndNonDistincts(aggregationNode));
return hasNoDistinctWithFilterOrMask(aggregationNode) && (hasMultipleDistincts(aggregationNode) || hasMixedDistinctAndNonDistincts(aggregationNode));
}

private static boolean hasNoDistinctWithFilterOrMask(AggregationNode aggregationNode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ public static boolean canUsePreAggregate(AggregationNode aggregationNode)
{
// single distinct can be supported in this rule, but it is already supported by SingleDistinctAggregationToGroupBy, which produces simpler plans (without group-id)
return (hasMultipleDistincts(aggregationNode) || hasMixedDistinctAndNonDistincts(aggregationNode)) &&
allDistinctAggregationsHaveSingleArgument(aggregationNode) &&
noFilters(aggregationNode) &&
noMasks(aggregationNode) &&
!aggregationNode.hasOrderings() &&
aggregationNode.getStep().equals(SINGLE);
allDistinctAggregationsHaveSingleArgument(aggregationNode) &&
noFilters(aggregationNode) &&
noMasks(aggregationNode) &&
!aggregationNode.hasOrderings() &&
aggregationNode.getStep().equals(SINGLE);
}

public static boolean hasMultipleDistincts(AggregationNode aggregationNode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public record CatalogVersion(String version)
private static boolean isAllowedCharacter(char c)
{
return ('0' <= c && c <= '9') ||
('a' <= c && c <= 'z') ||
c == '_' ||
c == '-';
('a' <= c && c <= 'z') ||
c == '_' ||
c == '-';
}

@JsonValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ public boolean equals(Object o)
}
PrivilegeInfo privilegeInfo = (PrivilegeInfo) o;
return privilege == privilegeInfo.privilege &&
grantOption == privilegeInfo.grantOption;
grantOption == privilegeInfo.grantOption;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,18 @@ public static boolean isSupportedType(Type type)
}

return BOOLEAN.equals(type) ||
BIGINT.equals(type) ||
INTEGER.equals(type) ||
SMALLINT.equals(type) ||
TINYINT.equals(type) ||
type instanceof DecimalType ||
REAL.equals(type) ||
DOUBLE.equals(type) ||
DATE.equals(type) ||
type instanceof TimestampType ||
VARBINARY.equals(type) ||
type instanceof VarcharType ||
type instanceof CharType;
BIGINT.equals(type) ||
INTEGER.equals(type) ||
SMALLINT.equals(type) ||
TINYINT.equals(type) ||
type instanceof DecimalType ||
REAL.equals(type) ||
DOUBLE.equals(type) ||
DATE.equals(type) ||
type instanceof TimestampType ||
VARBINARY.equals(type) ||
type instanceof VarcharType ||
type instanceof CharType;
}

private static boolean isStructuralType(Type type)
Expand Down
2 changes: 1 addition & 1 deletion lib/trino-orc/src/main/java/io/trino/orc/DiskRange.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public boolean equals(Object obj)
}
DiskRange other = (DiskRange) obj;
return this.offset == other.offset &&
this.length == other.length;
this.length == other.length;
}

@Override
Expand Down
14 changes: 7 additions & 7 deletions lib/trino-orc/src/test/java/io/trino/orc/OrcTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,13 @@ public static void writeOrcColumnTrino(File outputFile, CompressionKind compress
}
if (TIME_MICROS.equals(mappedType)) {
return Optional.of(new OrcType(
LONG,
ImmutableList.of(),
ImmutableList.of(),
Optional.empty(),
Optional.empty(),
Optional.empty(),
ImmutableMap.of(ICEBERG_LONG_TYPE, "TIME")));
LONG,
ImmutableList.of(),
ImmutableList.of(),
Optional.empty(),
Optional.empty(),
Optional.empty(),
ImmutableMap.of(ICEBERG_LONG_TYPE, "TIME")));
}
return Optional.empty();
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public boolean equals(Object obj)
}
ChunkKey other = (ChunkKey) obj;
return this.column == other.column &&
this.rowGroup == other.rowGroup;
this.rowGroup == other.rowGroup;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public boolean equals(Object obj)
}
DiskRange other = (DiskRange) obj;
return this.offset == other.offset &&
this.length == other.length;
this.length == other.length;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ private static boolean isBigLakeTable(TableDefinition tableDefinition)
//BigLake tables are external with connectionId that don't have objectMetadata (ObjectTable discriminator) and their uri starts with gs:// (OMNI table discriminator)
List<String> sourceUris = externalTableDefinition.getSourceUris();
return !isNullOrEmpty(externalTableDefinition.getConnectionId()) &&
isNullOrEmpty(externalTableDefinition.getObjectMetadata()) &&
(sourceUris != null && sourceUris.stream().allMatch(uri -> uri.startsWith("gs://")));
isNullOrEmpty(externalTableDefinition.getObjectMetadata()) &&
(sourceUris != null && sourceUris.stream().allMatch(uri -> uri.startsWith("gs://")));
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,6 @@ public ExchangeS3Config setSseKmsKeyId(String sseKmsKeyId)
public boolean isSseConfigValid()
{
return sseType == KMS && getSseKmsKeyId().isPresent() ||
sseType != KMS && getSseKmsKeyId().isEmpty();
sseType != KMS && getSseKmsKeyId().isEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public boolean equals(Object obj)
}
TpcdsSplit other = (TpcdsSplit) obj;
return this.totalParts == other.totalParts &&
this.partNumber == other.partNumber &&
this.noSexism == other.noSexism;
this.partNumber == other.partNumber &&
this.noSexism == other.noSexism;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public boolean equals(Object obj)
}
TpchSplit other = (TpchSplit) obj;
return this.totalParts == other.totalParts &&
this.partNumber == other.partNumber;
this.partNumber == other.partNumber;
}

@Override
Expand Down
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>306</version>
<version>307</version>
</parent>

<groupId>io.trino</groupId>
Expand Down Expand Up @@ -188,7 +188,6 @@
<dep.avro.version>1.12.0</dep.avro.version>
<dep.aws-sdk.version>1.12.791</dep.aws-sdk.version>
<dep.cassandra.version>4.17.0</dep.cassandra.version>
<dep.checkstyle.version>10.23.1</dep.checkstyle.version>
<dep.confluent.version>7.8.0</dep.confluent.version>
<dep.docker.images.version>119</dep.docker.images.version>
<dep.drift.version>1.24</dep.drift.version>
Expand All @@ -209,7 +208,7 @@
<dep.plugin.failsafe.version>${dep.plugin.surefire.version}</dep.plugin.failsafe.version>
<dep.protobuf.version>3.25.8</dep.protobuf.version>
<dep.snowflake.version>3.26.1</dep.snowflake.version>
<dep.swagger.version>2.2.37</dep.swagger.version>
<dep.swagger.version>2.2.38</dep.swagger.version>
<dep.takari.version>2.3.2</dep.takari.version>
<dep.tcnative.version>2.0.74.Final</dep.tcnative.version>
<dep.tempto.version>202</dep.tempto.version>
Expand Down Expand Up @@ -301,7 +300,7 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.34.5</version>
<version>2.34.6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public boolean equals(Object obj)
}
TpchScaledTable other = (TpchScaledTable) obj;
return Objects.equals(this.tableName, other.tableName) &&
this.scaleFactor == other.scaleFactor;
this.scaleFactor == other.scaleFactor;
}
}
Loading