Skip to content

add thrift inputformat implementation#19111

Merged
clintropolis merged 6 commits intoapache:masterfrom
clintropolis:thrift-input-format
Mar 10, 2026
Merged

add thrift inputformat implementation#19111
clintropolis merged 6 commits intoapache:masterfrom
clintropolis:thrift-input-format

Conversation

@clintropolis
Copy link
Member

Description

Adds a thrift InputFormat implementation, which I believe is the last data format extension which has not implemented InputFormat. This PR coupled with #19109, will allow us to remove all operator facing InputRowParser/ParseSpec implementations.

I had claude do most of the work here since its perfect for this kind of thing, with a few manual adjustments at the end.

{
try {
final Class<TBase> clazz = getThriftClass();
final TBase tbase = clazz.newInstance();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
Class.newInstance
should be avoided because it has been deprecated.
clazz = (Class<TBase>) Class.forName(thriftClassName);
}
// Verify the class can be instantiated
clazz.newInstance();

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
Class.newInstance
should be avoided because it has been deprecated.
@JsonCreator
public ThriftInputFormat(
@JsonProperty("flattenSpec") @Nullable JSONPathSpec flattenSpec,
@JsonProperty("thriftJar") @Nullable String jarPath,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Best to align the field/argument name with the json property name.

@clintropolis clintropolis merged commit 5c842e7 into apache:master Mar 10, 2026
37 checks passed
@clintropolis clintropolis deleted the thrift-input-format branch March 10, 2026 21:42
@github-actions github-actions bot added this to the 37.0.0 milestone Mar 10, 2026
GWphua pushed a commit to GWphua/druid that referenced this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants