Skip to content

fix filed mapping error when use where in sql#634

Open
sife0 wants to merge 1 commit intoapache:masterfrom
sife0:bug-arrow-to-row
Open

fix filed mapping error when use where in sql#634
sife0 wants to merge 1 commit intoapache:masterfrom
sife0:bug-arrow-to-row

Conversation

@sife0
Copy link

@sife0 sife0 commented Feb 4, 2026

Proposed changes

Exception:FLINK type is INT, but arrow type is VARCHAR.
FlinkSql Code

`

public static void main(String[] args) throws Exception {

    final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
    env.setParallelism(1);

    final StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);

    String sql = "CREATE  TABLE product_order_qrcode_info (\n" +
            "  `id` STRING, " +
            "  `dimension_type` INT ," +
            "  `material_code` STRING ," +
            "  `product_fac` STRING ," +
            "  `create_time` TIMESTAMP," +
            "  PRIMARY KEY (id) NOT ENFORCED\n" +
            ")\n" +
            "WITH (\n" +
            "  'connector' = 'doris',\n" +
            "  'fenodes' = 'xx.xx.xx.xx:xx',\n" +
            "  'table.identifier' = 'xx.xx',\n" +
            "  'username' = 'xxx',\n" +
            "  'password' = 'xx'" +
            ");";

    // register a table in the catalog
    tEnv.executeSql(sql);

    // define a dynamic aggregating query
    final Table result = tEnv.sqlQuery("SELECT * from product_order_qrcode_info where dimension_type=1");

    // print the result to the console
    tEnv.toDataStream(result).print();
    env.execute();
}

`

Code
image
field dimension_type in where not in fieldVectors

Problem Summary:

image create scheamMap and get field by name

Checklist(Required)

  1. Does it affect the original behavior: (No)
  2. Has unit tests been added: (No Need)
  3. Has document been added or modified: (No/)
  4. Does it need to update dependencies: (No)
  5. Are there any changes that cannot be rolled back: (No)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant