pgwhalen commented on code in PR #119: URL: https://github.com/apache/datafusion-java/pull/119#discussion_r4654561483
########## core/src/main/java/org/apache/datafusion/ScanArgs.java: ########## @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.datafusion; + +import java.util.List; +import java.util.Optional; +import java.util.OptionalLong; + +import org.apache.datafusion.protobuf.LogicalExprNode; + +/** + * A physical scan request using DataFusion's projection, expression and limit semantics. + * + * <p>Projection indices refer to the registered table schema. An absent projection means all + * columns; a present empty list means no columns (for example, {@code COUNT(*)}), not no rows. + * Filters use the same expression protobufs as DataFusion logical plans, not SQL strings. + * + * <p>The optional limit is the value supplied by DataFusion's planner. Sources may return more + * rows; they must not return fewer than requested when that many matching rows are available. + * DataFusion retains responsibility for deciding whether a limit can safely cross a residual + * filter. Limits outside the non-negative Java {@code long} range are not forwarded; DataFusion + * still applies the query's limit. + */ +public record ScanArgs( Review Comment: FWIW, [here is my working draft](https://github.com/pgwhalen/datafusion-java/pull/1/changes) of the "public API" agent instructions that I mentioned wanting to do many months ago. I have larger ambitions for it but tried to slim it down for what is realistic right now. If that seems directionally correct and only require small tweaks, I'd be happy to open a proper PR. There are some minor divergences from the rules there which I could open up follow-up PRs for. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
