Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraint and tupleDomain #826

Closed
51yu opened this issue May 28, 2019 · 4 comments
Closed

Constraint and tupleDomain #826

51yu opened this issue May 28, 2019 · 4 comments

Comments

@51yu
Copy link
Contributor

51yu commented May 28, 2019

how to provide tuple doman when make api call to data source, any suggestion ?
Seems like connectorLayout/handler is going to be deprecated ...

https://github.com/prestosql/presto/blob/master/presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorTableLayout.java#L31

https://github.com/prestosql/presto/blob/master/presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorSplitManager.java#L19
^^ and further, no layout when provide split in the future ?

@Praveen2112
Copy link
Member

hi, we can provide the TupleDomain to the datasource using the ConnectorTableHandle and now any filter expression will be passed to the connector using ConnectorMetadata#applyFilter which will be invoked from PushPredicateIntoTableScan

@51yu
Copy link
Contributor Author

51yu commented May 28, 2019

Thanks @Praveen2112 .
That would be great if we have a sample connector which use
ConnectorMetadata#applyFilter instead of layout for us app developer
Look through existing connectors in repo, still relies on table layout for predicate purpose

@51yu 51yu closed this as completed May 28, 2019
@Praveen2112
Copy link
Member

@L0YU It is currently implemented in JDBC connector and TPCH connector (For Hive it is not yet merged). You can check the implementation from there. For other connectors we are migrating to this model. #781 keeps track of connectors which have migrated to the new model.

@51yu
Copy link
Contributor Author

51yu commented May 28, 2019

@Praveen2112 That's awesome !

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

No branches or pull requests

2 participants