Skip to content

Commit

Permalink
fix bigtable e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Moskalenko <moskalenko.alexey@gmail.com>
  • Loading branch information
pyalex committed Apr 13, 2021
1 parent 1667baf commit f5ad854
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.apache.spark.sql.avro.functions.from_avro
import org.apache.spark.sql.catalyst.encoders.RowEncoder
import org.apache.spark.sql.execution.python.UserDefinedPythonFunction
import org.apache.spark.sql.execution.streaming.ProcessingTimeTrigger
import org.apache.spark.sql.functions.{expr, struct, udf}
import org.apache.spark.sql.functions.{expr, lit, struct, udf, coalesce}
import org.apache.spark.sql.streaming.StreamingQuery
import org.apache.spark.sql.types.BooleanType
import org.apache.spark.{SparkEnv, SparkFiles}
Expand Down Expand Up @@ -98,7 +98,7 @@ object StreamingPipeline extends BasePipeline with Serializable {
val columns = batchDF.columns.map(batchDF(_))
batchDF.withColumn(
"_isValid",
rowValidator.allChecks && validationUDF.get(struct(columns: _*))
rowValidator.allChecks && coalesce(validationUDF.get(struct(columns: _*)), lit(false))
)
} else {
batchDF.withColumn("_isValid", rowValidator.allChecks)
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/test_online_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_list_jobs_long_table_name(
entity = Entity(name="s2id", description="S2id", value_type=ValueType.INT64,)

feature_table = FeatureTable(
name="just1a2featuretable3with4a5really6really7really8really9really10really11really12long13name",
name="just1a2featuretable3with4a5really6really7really8really9really10",
entities=["s2id"],
features=[Feature("unique_drivers", ValueType.INT64)],
batch_source=batch_source,
Expand Down

0 comments on commit f5ad854

Please sign in to comment.