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 @@ -2803,6 +2803,9 @@ public OptionalInt getMaxWriterTasks(Session session, String catalogName)
public boolean allowSplittingReadIntoMultipleSubQueries(Session session, TableHandle tableHandle)
{
CatalogHandle catalogHandle = tableHandle.catalogHandle();
if (catalogHandle.getType().isInternal()) {
return false;
}
CatalogMetadata catalogMetadata = getCatalogMetadata(session, catalogHandle);
ConnectorSession connectorSession = session.toConnectorSession(catalogHandle);
return catalogMetadata.getMetadata(session).allowSplittingReadIntoMultipleSubQueries(connectorSession, tableHandle.connectorHandle());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4061,8 +4061,8 @@ private Optional<SystemTable> getRawSystemTable(ConnectorSession session, Schema
@Override
public boolean allowSplittingReadIntoMultipleSubQueries(ConnectorSession session, ConnectorTableHandle tableHandle)
{
// dont split to subqueries if tableHandle is systemTableHandle, delta lake supports only a columnar (parquet) storage format
Comment thread
Dith3r marked this conversation as resolved.
Outdated
return tableHandle instanceof DeltaLakeTableHandle;
// delta lake supports only a columnar (parquet) storage format
return true;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3990,12 +3990,7 @@ private static Optional<CatalogSchemaTableName> redirectTableToHudi(Optional<Str
@Override
public boolean allowSplittingReadIntoMultipleSubQueries(ConnectorSession session, ConnectorTableHandle tableHandle)
{
// dont split to subqueries if tableHandle is systemTableHandle
if (!(tableHandle instanceof HiveTableHandle hiveTableHandle)) {
return false;
}

SchemaTableName tableName = hiveTableHandle.getSchemaTableName();
SchemaTableName tableName = ((HiveTableHandle) tableHandle).getSchemaTableName();

Table table = metastore.getTable(tableName.getSchemaName(), tableName.getTableName())
.orElseThrow(() -> new TableNotFoundException(tableName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ public void validateScan(ConnectorSession session, ConnectorTableHandle handle)
@Override
public boolean allowSplittingReadIntoMultipleSubQueries(ConnectorSession session, ConnectorTableHandle tableHandle)
{
// dont split to subqueries if tableHandle is systemTableHandle, hudi supports only a columnar (parquet) storage format
return tableHandle instanceof HudiTableHandle;
// hudi supports only a columnar (parquet) storage format
return true;
}

HiveMetastore getMetastore()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3314,11 +3314,8 @@ public Optional<CatalogSchemaTableName> redirectTable(ConnectorSession session,
@Override
public boolean allowSplittingReadIntoMultipleSubQueries(ConnectorSession session, ConnectorTableHandle connectorTableHandle)
{
// dont split to subqueries if tableHandle is systemTableHandle
if (!(connectorTableHandle instanceof IcebergTableHandle icebergTableHandle)) {
return false;
}
IcebergFileFormat storageFormat = getFileFormat(icebergTableHandle.getStorageProperties());
IcebergTableHandle tableHandle = (IcebergTableHandle) connectorTableHandle;
IcebergFileFormat storageFormat = getFileFormat(tableHandle.getStorageProperties());

return storageFormat == IcebergFileFormat.ORC || storageFormat == IcebergFileFormat.PARQUET;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ public Optional<SampleApplicationResult<ConnectorTableHandle>> applySample(Conne
@Override
public boolean allowSplittingReadIntoMultipleSubQueries(ConnectorSession session, ConnectorTableHandle tableHandle)
{
// dont split to subqueries if tableHandle is systemTableHandle
return tableHandle instanceof MemoryTableHandle;
return true;
}

@Override
Expand Down