Sorry for the spam, forgot to add the pertinent link to the code change.

https://github.com/fernando-wizeline/beam/commit/abc17db41b6aabf3f337c7742526e5ae9655f40b

Thanks!

On Tue, Apr 20, 2021 at 10:17 AM Fernando Morales Martinez <
fernando.mora...@wizeline.com> wrote:

> Hi team,
>
> I'm working on adding tests to PubsubTableProviderIT class to test the
> proto support added to Pubsub.
>
> The issue below occurs when running
> *testSQLReadAndWriteWithSameFlatTableDefinition*,
> *testSQLInsertRowsToPubsubFlat* and
> *testSQLInsertRowsToPubsubWithTimestampAttributeFlat*
>  of PubsubTableProviderIT.
>
> Right now I'm facing an issue when executing method inferAndVerifySchema
> of class ProtoPayloadSerializerProvider. The expected schema is set as
>
> 'Fields:
> Field{name=name, description=, type=STRING, options={{}}}
> Field{name=height, description=, type=INT32, options={{}}}
> Field{name=knowsJavascript, description=, type=BOOLEAN, options={{}}}
> Options:{{}}'
>
> and the schema obtained from the protoclass is:
>
> 'Fields:
> Field{name=name, description=, type=STRING NOT NULL,
> options={{beam:option:proto:meta:number=Option{type=INT32 NOT NULL,
> value=1}}}}
> Field{name=height, description=, type=INT32 NOT NULL,
> options={{beam:option:proto:meta:number=Option{type=INT32 NOT NULL,
> value=2}}}}
> Options:{{beam:option:proto:meta:type_name=Option{type=STRING NOT NULL,
> value=NameHeightMessage}}}'
> java.lang.IllegalArgumentException: Given message schema: 'Fields:
> Field{name=name, description=, type=STRING, options={{}}}
> Field{name=height, description=, type=INT32, options={{}}}
> Field{name=knowsJavascript, description=, type=BOOLEAN, options={{}}}
> Options:{{}}'
>
> I'm guessing, by the name of the tests, the idea is to compare the payload
> (protoclass in this case) against the flat schema, but then the validation
> in inferAndVerifySchema fails.
>
> Should I be looking for a workaround for that and if so, can you shed some
> light on how to proceed?
>
> Thanks for the help!
> - Fernando Morales
>
>

-- 
*This email and its contents (including any attachments) are being sent to
you on the condition of confidentiality and may be protected by legal
privilege. Access to this email by anyone other than the intended recipient
is unauthorized. If you are not the intended recipient, please immediately
notify the sender by replying to this message and delete the material
immediately from your system. Any further use, dissemination, distribution
or reproduction of this email is strictly prohibited. Further, no
representation is made with respect to any content contained in this email.*

Reply via email to