-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: disable checking for uint_8 and uint_16 if complex type readers are enabled #1376
Changes from all commits
940aed5
db7b11e
0aa27d6
5dfdc19
9389be8
501c52a
a6c33a0
2c2237d
ddfac54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -608,6 +608,14 @@ object CometConf extends ShimCometConf { | |
.booleanConf | ||
.createWithDefault(false) | ||
|
||
val COMET_SCAN_ALLOW_INCOMPATIBLE: ConfigEntry[Boolean] = | ||
conf("spark.comet.scan.allowIncompatible") | ||
.doc( | ||
"Comet is not currently fully compatible with Spark for all datatypes. " + | ||
s"Set this config to true to allow them anyway. $COMPAT_GUIDE.") | ||
.booleanConf | ||
.createWithDefault(true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that we should default this to |
||
|
||
val COMET_EXPR_ALLOW_INCOMPATIBLE: ConfigEntry[Boolean] = | ||
conf("spark.comet.expression.allowIncompatible") | ||
.doc( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1352,6 +1352,15 @@ object CometSparkSessionExtensions extends Logging { | |
org.apache.spark.SPARK_VERSION >= "4.0" | ||
} | ||
|
||
def isComplexTypeReaderEnabled(conf: SQLConf): Boolean = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I find the naming confusing here. This method determines if we are using Complex type support was a big motivation for adding these new scans, but it doesn't seem to make sense to refer to complex types in the changes in this PR. This is just a nit, and we can rename the methods in a future PR. |
||
CometConf.COMET_NATIVE_SCAN_IMPL.get(conf) == CometConf.SCAN_NATIVE_ICEBERG_COMPAT || | ||
CometConf.COMET_NATIVE_SCAN_IMPL.get(conf) == CometConf.SCAN_NATIVE_DATAFUSION | ||
} | ||
|
||
def usingDataFusionParquetReader(conf: SQLConf): Boolean = { | ||
isComplexTypeReaderEnabled(conf) && !CometConf.COMET_SCAN_ALLOW_INCOMPATIBLE.get(conf) | ||
} | ||
|
||
/** Calculates required memory overhead in MB per executor process for Comet. */ | ||
def getCometMemoryOverheadInMiB(sparkConf: SparkConf): Long = { | ||
// `spark.executor.memory` default value is 1g | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We link to the Compatibility Guide here but there is no new information in that guide about handling for byte/short, so would be good to add that. This could be done in a follow on PR.