Skip to content

Commit

Permalink
fallback metadatacolum if not velox backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangyang Gao committed Dec 6, 2023
1 parent 79ba0da commit 84ac7ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ object BackendSettings extends BackendSettingsApi {
}
}

override def supportNativeMetadataColumns(): Boolean = true

override def supportExpandExec(): Boolean = true

override def supportSortExec(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ trait BackendSettingsApi {
fields: Array[StructField],
partTable: Boolean,
paths: Seq[String]): Boolean = false
def supportNativeMetadataColumns(): Boolean = false
def supportExpandExec(): Boolean = false
def supportSortExec(): Boolean = false
def supportSortMergeJoinExec(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ class FileSourceScanExecTransformer(
override def hashCode(): Int = super.hashCode()

override protected def doValidateInternal(): ValidationResult = {
if (
!metadataColumns.isEmpty && !BackendsApiManager.getSettings.supportNativeMetadataColumns()
) {
return ValidationResult.notOk(s"Unsupported metadata columns scan in native.")
}

if (hasUnsupportedColumns) {
return ValidationResult.notOk(s"Unsupported columns scan in native.")
}
Expand Down

0 comments on commit 84ac7ff

Please sign in to comment.