You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Brendan K (Jira)" <ji...@apache.org> on 2020/09/17 08:58:00 UTC
[jira] [Created] (BEAM-10918) Row.withSchema.withFieldValues is
broken
Brendan K created BEAM-10918:
--------------------------------
Summary: Row.withSchema.withFieldValues is broken
Key: BEAM-10918
URL: https://issues.apache.org/jira/browse/BEAM-10918
Project: Beam
Issue Type: Bug
Components: dsl-sql
Affects Versions: 2.23.0
Reporter: Brendan K
The following code will raise an exception. Even though it should work.
{{Schema s = new Schema.Builder().addField("a", Schema.FieldType.STRING).build();}}
{{HashMap<String, Object> rowEntry = new HashMap<>();}}
{{rowEntry.put("a", "some string");}}
{{Row a = Row.withSchema(s).withFieldValues(rowEntry).build();}}
{{Exception:}}
{{java.lang.IllegalStateExceptionjava.lang.IllegalStateException at org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState(Preconditions.java:491) at org.apache.beam.sdk.values.Row$Builder.withFieldValues(Row.java:753) at com.anz.csa.schema.TestBeamRow.testBeamRowBuilder(TestBeamRow.java:19) at java.lang.Thread.run(Thread.java:748)}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)