beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Kedin (JIRA)" <>
Subject [jira] [Created] (BEAM-3238) [SQL] Add builder to BeamRecordSqlType
Date Thu, 23 Nov 2017 00:15:00 GMT
Anton Kedin created BEAM-3238:

             Summary: [SQL] Add builder to BeamRecordSqlType
                 Key: BEAM-3238
             Project: Beam
          Issue Type: Improvement
          Components: dsl-sql
            Reporter: Anton Kedin
            Assignee: Anton Kedin

Currently it's hard to match field names with types when constructing a BeamRecordSqlType,
like [here|]:

BeamRecordSqlType type = BeamRecordSqlType.create(
    Arrays.asList("ts", "c_tinyint", "c_smallint",
        "c_integer", "c_bigint", "c_float", "c_double", "c_decimal",
        "c_tinyint_max", "c_smallint_max", "c_integer_max", "c_bigint_max"),
    Arrays.asList(Types.DATE, Types.TINYINT, Types.SMALLINT,
        Types.INTEGER, Types.BIGINT, Types.FLOAT, Types.DOUBLE, Types.DECIMAL,
        Types.TINYINT, Types.SMALLINT, Types.INTEGER, Types.BIGINT)

It would be much more readable to have a builder, along these lines:
  .withField("f_int", Types.INTEGER)

This message was sent by Atlassian JIRA

View raw message