anishshri-db commented on code in PR #53104:
URL: https://github.com/apache/spark/pull/53104#discussion_r2582801732
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/state/StateDataSource.scala:
##########
@@ -492,6 +505,29 @@ object StateSourceOptions extends DataSourceOptions {
val readChangeFeed =
Option(options.get(READ_CHANGE_FEED)).exists(_.toBoolean)
+ val internalOnlyReadAllColumnFamilies = try {
+
Option(options.get(INTERNAL_ONLY_READ_ALL_COLUMN_FAMILIES)).exists(_.toBoolean)
+ } catch {
+ case _: IllegalArgumentException =>
+ throw
StateDataSourceErrors.invalidOptionValue(INTERNAL_ONLY_READ_ALL_COLUMN_FAMILIES,
+ "Boolean value is expected")
+ }
+
+ if (internalOnlyReadAllColumnFamilies && stateVarName.isDefined) {
Review Comment:
We don't need to do individual if conditions.
Lets do something like this
```
if (_readAllColumnFamilies) {
if (stateVarName.isDefined) {
... throw error
}
// cover other conditions
// add a log here to indicate that the flag is enabled
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]