Skip to content
Permalink
Browse files
[hotfix][table-planner][tests] Remove configuration for default legac…
…y-cast-behaviour

Since `table.exec.legacy-cast-behaviour` is disabled by default, there
is no need to explicitely set it in the configuration of the Cast
related IT tests.

Call `super.getConfiguration()` to inherit the configuration set in the
superclass and add/override with more config options in the subclass.
  • Loading branch information
matriv authored and twalthr committed May 9, 2022
1 parent 3a18b95 commit 87046b24a348ee3183a8b979c8d5ab47b4abbc6f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
@@ -20,7 +20,6 @@

import org.apache.flink.configuration.Configuration;
import org.apache.flink.table.api.TableException;
import org.apache.flink.table.api.config.ExecutionConfigOptions;
import org.apache.flink.table.api.config.TableConfigOptions;
import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
import org.apache.flink.table.types.AbstractDataType;
@@ -76,7 +75,6 @@
import static org.apache.flink.table.api.DataTypes.VARCHAR;
import static org.apache.flink.table.api.DataTypes.YEAR;
import static org.apache.flink.table.api.Expressions.$;
import static org.apache.flink.table.api.config.ExecutionConfigOptions.LegacyCastBehaviour;
import static org.apache.flink.util.CollectionUtil.entry;
import static org.apache.flink.util.CollectionUtil.map;
import static org.assertj.core.api.Assertions.assertThat;
@@ -117,11 +115,7 @@ public class CastFunctionITCase extends BuiltInFunctionTestBase {

@Override
Configuration getConfiguration() {
return new Configuration()
.set(TableConfigOptions.LOCAL_TIME_ZONE, TEST_TZ.getId())
.set(
ExecutionConfigOptions.TABLE_EXEC_LEGACY_CAST_BEHAVIOUR,
LegacyCastBehaviour.DISABLED);
return super.getConfiguration().set(TableConfigOptions.LOCAL_TIME_ZONE, TEST_TZ.getId());
}

@Override
@@ -19,10 +19,8 @@
package org.apache.flink.table.planner.functions;

import org.apache.flink.api.common.typeutils.base.LocalDateTimeSerializer;
import org.apache.flink.configuration.Configuration;
import org.apache.flink.table.annotation.DataTypeHint;
import org.apache.flink.table.api.DataTypes;
import org.apache.flink.table.api.config.ExecutionConfigOptions;
import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
import org.apache.flink.table.functions.ScalarFunction;
import org.apache.flink.types.Row;
@@ -54,14 +52,6 @@
/** Tests for {@link BuiltInFunctionDefinitions#CAST} regarding {@link DataTypes#ROW}. */
class CastFunctionMiscITCase extends BuiltInFunctionTestBase {

@Override
Configuration getConfiguration() {
return new Configuration()
.set(
ExecutionConfigOptions.TABLE_EXEC_LEGACY_CAST_BEHAVIOUR,
ExecutionConfigOptions.LegacyCastBehaviour.DISABLED);
}

@Override
Stream<TestSetSpec> getTestSetSpecs() {
return Stream.of(

0 comments on commit 87046b2

Please sign in to comment.