[jira] [Updated] (FLINK-28741) Unexpected result if insert 'false' to boolean column
[ https://issues.apache.org/jira/browse/FLINK-28741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Flink Jira Bot updated FLINK-28741: --- Labels: auto-deprioritized-major pull-request-available (was: pull-request-available stale-major) Priority: Minor (was: Major) This issue was labeled "stale-major" 7 days ago and has not received any updates so it is being deprioritized. If this ticket is actually Major, please raise the priority and ask a committer to assign you the issue or revive the public discussion. > Unexpected result if insert 'false' to boolean column > - > > Key: FLINK-28741 > URL: https://issues.apache.org/jira/browse/FLINK-28741 > Project: Flink > Issue Type: Bug > Components: Connectors / Hive >Affects Versions: 1.15.0, 1.15.1 >Reporter: Jing Zhang >Priority: Minor > Labels: auto-deprioritized-major, pull-request-available > > Using hive dialect to insert a string 'false' to boolean column, the result > is true. It seems to treat all non-empty string as true. > The error could be reproduced in the following ITCase. > {code:java} > @Test > public void testUnExpectedResult() throws ExecutionException, > InterruptedException { > HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); > CoreModule coreModule = CoreModule.INSTANCE; > for (String loaded : tableEnv.listModules()) { > tableEnv.unloadModule(loaded); > } > tableEnv.loadModule("hive", hiveModule); > tableEnv.loadModule("core", coreModule); > // create source table > tableEnv.executeSql( > "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` > string)"); > // prepare a data which value is 'false' > tableEnv.executeSql("insert overwrite test_table partition(p_date = > '20220612') values ('false')") > .await(); > // create target table which only contain one boolean column > tableEnv.executeSql( > "CREATE TABLE target_table (flag boolean) PARTITIONED BY > (`p_date` string)"); > // > tableEnv.executeSql( > "insert overwrite table target_table partition(p_date = > '20220724') " > + "SELECT params FROM test_table WHERE > p_date='20220612'").await(); > TableImpl flinkTable = > (TableImpl) tableEnv.sqlQuery("select flag from target_table > where p_date = '20220724'"); >List results = > CollectionUtil.iteratorToList(flinkTable.execute().collect()); > assertEquals( > "[false]", results.toString()); > } {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-28741) Unexpected result if insert 'false' to boolean column
[ https://issues.apache.org/jira/browse/FLINK-28741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Flink Jira Bot updated FLINK-28741: --- Labels: pull-request-available stale-major (was: pull-request-available) I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issues has been marked as Major but is unassigned and neither itself nor its Sub-Tasks have been updated for 60 days. I have gone ahead and added a "stale-major" to the issue". If this ticket is a Major, please either assign yourself or give an update. Afterwards, please remove the label or in 7 days the issue will be deprioritized. > Unexpected result if insert 'false' to boolean column > - > > Key: FLINK-28741 > URL: https://issues.apache.org/jira/browse/FLINK-28741 > Project: Flink > Issue Type: Bug > Components: Connectors / Hive >Affects Versions: 1.15.0, 1.15.1 >Reporter: Jing Zhang >Priority: Major > Labels: pull-request-available, stale-major > > Using hive dialect to insert a string 'false' to boolean column, the result > is true. It seems to treat all non-empty string as true. > The error could be reproduced in the following ITCase. > {code:java} > @Test > public void testUnExpectedResult() throws ExecutionException, > InterruptedException { > HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); > CoreModule coreModule = CoreModule.INSTANCE; > for (String loaded : tableEnv.listModules()) { > tableEnv.unloadModule(loaded); > } > tableEnv.loadModule("hive", hiveModule); > tableEnv.loadModule("core", coreModule); > // create source table > tableEnv.executeSql( > "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` > string)"); > // prepare a data which value is 'false' > tableEnv.executeSql("insert overwrite test_table partition(p_date = > '20220612') values ('false')") > .await(); > // create target table which only contain one boolean column > tableEnv.executeSql( > "CREATE TABLE target_table (flag boolean) PARTITIONED BY > (`p_date` string)"); > // > tableEnv.executeSql( > "insert overwrite table target_table partition(p_date = > '20220724') " > + "SELECT params FROM test_table WHERE > p_date='20220612'").await(); > TableImpl flinkTable = > (TableImpl) tableEnv.sqlQuery("select flag from target_table > where p_date = '20220724'"); >List results = > CollectionUtil.iteratorToList(flinkTable.execute().collect()); > assertEquals( > "[false]", results.toString()); > } {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-28741) Unexpected result if insert 'false' to boolean column
[ https://issues.apache.org/jira/browse/FLINK-28741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] luoyuxia updated FLINK-28741: - Parent: (was: FLINK-26360) Issue Type: Bug (was: Sub-task) > Unexpected result if insert 'false' to boolean column > - > > Key: FLINK-28741 > URL: https://issues.apache.org/jira/browse/FLINK-28741 > Project: Flink > Issue Type: Bug > Components: Connectors / Hive >Affects Versions: 1.15.0, 1.15.1 >Reporter: Jing Zhang >Priority: Major > Labels: pull-request-available > > Using hive dialect to insert a string 'false' to boolean column, the result > is true. It seems to treat all non-empty string as true. > The error could be reproduced in the following ITCase. > {code:java} > @Test > public void testUnExpectedResult() throws ExecutionException, > InterruptedException { > HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); > CoreModule coreModule = CoreModule.INSTANCE; > for (String loaded : tableEnv.listModules()) { > tableEnv.unloadModule(loaded); > } > tableEnv.loadModule("hive", hiveModule); > tableEnv.loadModule("core", coreModule); > // create source table > tableEnv.executeSql( > "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` > string)"); > // prepare a data which value is 'false' > tableEnv.executeSql("insert overwrite test_table partition(p_date = > '20220612') values ('false')") > .await(); > // create target table which only contain one boolean column > tableEnv.executeSql( > "CREATE TABLE target_table (flag boolean) PARTITIONED BY > (`p_date` string)"); > // > tableEnv.executeSql( > "insert overwrite table target_table partition(p_date = > '20220724') " > + "SELECT params FROM test_table WHERE > p_date='20220612'").await(); > TableImpl flinkTable = > (TableImpl) tableEnv.sqlQuery("select flag from target_table > where p_date = '20220724'"); >List results = > CollectionUtil.iteratorToList(flinkTable.execute().collect()); > assertEquals( > "[false]", results.toString()); > } {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-28741) Unexpected result if insert 'false' to boolean column
[ https://issues.apache.org/jira/browse/FLINK-28741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated FLINK-28741: --- Labels: pull-request-available (was: ) > Unexpected result if insert 'false' to boolean column > - > > Key: FLINK-28741 > URL: https://issues.apache.org/jira/browse/FLINK-28741 > Project: Flink > Issue Type: Sub-task > Components: Connectors / Hive >Affects Versions: 1.15.0, 1.15.1 >Reporter: Jing Zhang >Priority: Major > Labels: pull-request-available > > Using hive dialect to insert a string 'false' to boolean column, the result > is true. It seems to treat all non-empty string as true. > The error could be reproduced in the following ITCase. > {code:java} > @Test > public void testUnExpectedResult() throws ExecutionException, > InterruptedException { > HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); > CoreModule coreModule = CoreModule.INSTANCE; > for (String loaded : tableEnv.listModules()) { > tableEnv.unloadModule(loaded); > } > tableEnv.loadModule("hive", hiveModule); > tableEnv.loadModule("core", coreModule); > // create source table > tableEnv.executeSql( > "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` > string)"); > // prepare a data which value is 'false' > tableEnv.executeSql("insert overwrite test_table partition(p_date = > '20220612') values ('false')") > .await(); > // create target table which only contain one boolean column > tableEnv.executeSql( > "CREATE TABLE target_table (flag boolean) PARTITIONED BY > (`p_date` string)"); > // > tableEnv.executeSql( > "insert overwrite table target_table partition(p_date = > '20220724') " > + "SELECT params FROM test_table WHERE > p_date='20220612'").await(); > TableImpl flinkTable = > (TableImpl) tableEnv.sqlQuery("select flag from target_table > where p_date = '20220724'"); >List results = > CollectionUtil.iteratorToList(flinkTable.execute().collect()); > assertEquals( > "[false]", results.toString()); > } {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-28741) Unexpected result if insert 'false' to boolean column
[ https://issues.apache.org/jira/browse/FLINK-28741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] luoyuxia updated FLINK-28741: - Parent: FLINK-26360 Issue Type: Sub-task (was: Bug) > Unexpected result if insert 'false' to boolean column > - > > Key: FLINK-28741 > URL: https://issues.apache.org/jira/browse/FLINK-28741 > Project: Flink > Issue Type: Sub-task > Components: Connectors / Hive >Affects Versions: 1.15.0, 1.15.1 >Reporter: Jing Zhang >Priority: Major > > Using hive dialect to insert a string 'false' to boolean column, the result > is true. It seems to treat all non-empty string as true. > The error could be reproduced in the following ITCase. > {code:java} > @Test > public void testUnExpectedResult() throws ExecutionException, > InterruptedException { > HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); > CoreModule coreModule = CoreModule.INSTANCE; > for (String loaded : tableEnv.listModules()) { > tableEnv.unloadModule(loaded); > } > tableEnv.loadModule("hive", hiveModule); > tableEnv.loadModule("core", coreModule); > // create source table > tableEnv.executeSql( > "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` > string)"); > // prepare a data which value is 'false' > tableEnv.executeSql("insert overwrite test_table partition(p_date = > '20220612') values ('false')") > .await(); > // create target table which only contain one boolean column > tableEnv.executeSql( > "CREATE TABLE target_table (flag boolean) PARTITIONED BY > (`p_date` string)"); > // > tableEnv.executeSql( > "insert overwrite table target_table partition(p_date = > '20220724') " > + "SELECT params FROM test_table WHERE > p_date='20220612'").await(); > TableImpl flinkTable = > (TableImpl) tableEnv.sqlQuery("select flag from target_table > where p_date = '20220724'"); >List results = > CollectionUtil.iteratorToList(flinkTable.execute().collect()); > assertEquals( > "[false]", results.toString()); > } {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Updated] (FLINK-28741) Unexpected result if insert 'false' to boolean column
[ https://issues.apache.org/jira/browse/FLINK-28741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jing Zhang updated FLINK-28741: --- Description: Using hive dialect to insert a string 'false' to boolean column, the result is true. It seems to treat all non-empty string as true. The error could be reproduced in the following ITCase. {code:java} @Test public void testUnExpectedResult() throws ExecutionException, InterruptedException { HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); CoreModule coreModule = CoreModule.INSTANCE; for (String loaded : tableEnv.listModules()) { tableEnv.unloadModule(loaded); } tableEnv.loadModule("hive", hiveModule); tableEnv.loadModule("core", coreModule); // create source table tableEnv.executeSql( "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` string)"); // prepare a data which value is 'false' tableEnv.executeSql("insert overwrite test_table partition(p_date = '20220612') values ('false')") .await(); // create target table which only contain one boolean column tableEnv.executeSql( "CREATE TABLE target_table (flag boolean) PARTITIONED BY (`p_date` string)"); // tableEnv.executeSql( "insert overwrite table target_table partition(p_date = '20220724') " + "SELECT params FROM test_table WHERE p_date='20220612'").await(); TableImpl flinkTable = (TableImpl) tableEnv.sqlQuery("select flag from target_table where p_date = '20220724'"); List results = CollectionUtil.iteratorToList(flinkTable.execute().collect()); assertEquals( "[false]", results.toString()); } {code} was: Using hive dialect to insert a string 'false' to boolean column, the result is true. The error could be reproduced in the following ITCase. {code:java} @Test public void testUnExpectedResult() throws ExecutionException, InterruptedException { HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); CoreModule coreModule = CoreModule.INSTANCE; for (String loaded : tableEnv.listModules()) { tableEnv.unloadModule(loaded); } tableEnv.loadModule("hive", hiveModule); tableEnv.loadModule("core", coreModule); // create source table tableEnv.executeSql( "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` string)"); // prepare a data which value is 'false' tableEnv.executeSql("insert overwrite test_table partition(p_date = '20220612') values ('false')") .await(); // create target table which only contain one boolean column tableEnv.executeSql( "CREATE TABLE target_table (flag boolean) PARTITIONED BY (`p_date` string)"); // tableEnv.executeSql( "insert overwrite table target_table partition(p_date = '20220724') " + "SELECT params FROM test_table WHERE p_date='20220612'").await(); TableImpl flinkTable = (TableImpl) tableEnv.sqlQuery("select flag from target_table where p_date = '20220724'"); List results = CollectionUtil.iteratorToList(flinkTable.execute().collect()); assertEquals( "[false]", results.toString()); } {code} > Unexpected result if insert 'false' to boolean column > - > > Key: FLINK-28741 > URL: https://issues.apache.org/jira/browse/FLINK-28741 > Project: Flink > Issue Type: Bug > Components: Connectors / Hive >Affects Versions: 1.15.0, 1.15.1 >Reporter: Jing Zhang >Priority: Major > > Using hive dialect to insert a string 'false' to boolean column, the result > is true. It seems to treat all non-empty string as true. > The error could be reproduced in the following ITCase. > {code:java} > @Test > public void testUnExpectedResult() throws ExecutionException, > InterruptedException { > HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); > CoreModule coreModule = CoreModule.INSTANCE; > for (String loaded : tableEnv.listModules()) { > tableEnv.unloadModule(loaded); > } > tableEnv.loadModule("hive", hiveModule); > tableEnv.loadModule("core", coreModule); > // create source table > tableEnv.executeSql( > "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` > string)"); > // prepare a data which value is 'false' > tableEnv.executeSql("insert overwrite test_table partition(p_date = > '20220612') values ('false')") > .await(); > // create target table which only contain one boolean column > tableEnv.executeSql( > "CREATE TABLE target_table (flag boolean) PARTITIONED BY > (`p_date` string)"); > // > tableEnv.executeSql( > "insert overwrite table target_table partition(p_date = > '20220724') " >
[jira] [Updated] (FLINK-28741) Unexpected result if insert 'false' to boolean column
[ https://issues.apache.org/jira/browse/FLINK-28741?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jing Zhang updated FLINK-28741: --- Affects Version/s: 1.15.1 1.15.0 > Unexpected result if insert 'false' to boolean column > - > > Key: FLINK-28741 > URL: https://issues.apache.org/jira/browse/FLINK-28741 > Project: Flink > Issue Type: Bug > Components: Connectors / Hive >Affects Versions: 1.15.0, 1.15.1 >Reporter: Jing Zhang >Priority: Major > > Using hive dialect to insert a string 'false' to boolean column, the result > is true. > The error could be reproduced in the following ITCase. > {code:java} > @Test > public void testUnExpectedResult() throws ExecutionException, > InterruptedException { > HiveModule hiveModule = new HiveModule(hiveCatalog.getHiveVersion()); > CoreModule coreModule = CoreModule.INSTANCE; > for (String loaded : tableEnv.listModules()) { > tableEnv.unloadModule(loaded); > } > tableEnv.loadModule("hive", hiveModule); > tableEnv.loadModule("core", coreModule); > // create source table > tableEnv.executeSql( > "CREATE TABLE test_table (params string) PARTITIONED BY (`p_date` > string)"); > // prepare a data which value is 'false' > tableEnv.executeSql("insert overwrite test_table partition(p_date = > '20220612') values ('false')") > .await(); > // create target table which only contain one boolean column > tableEnv.executeSql( > "CREATE TABLE target_table (flag boolean) PARTITIONED BY > (`p_date` string)"); > // > tableEnv.executeSql( > "insert overwrite table target_table partition(p_date = > '20220724') " > + "SELECT params FROM test_table WHERE > p_date='20220612'").await(); > TableImpl flinkTable = > (TableImpl) tableEnv.sqlQuery("select flag from target_table > where p_date = '20220724'"); >List results = > CollectionUtil.iteratorToList(flinkTable.execute().collect()); > assertEquals( > "[false]", results.toString()); > } {code} > -- This message was sent by Atlassian Jira (v8.20.10#820010)