rdblue commented on a change in pull request #89: Make read-path Evaluators
honor case sensitivity flag. Expose flag in Spark Reader.
URL: https://github.com/apache/incubator-iceberg/pull/89#discussion_r264918365
##########
File path: api/src/main/java/com/netflix/iceberg/Schema.java
##########
@@ -207,13 +211,31 @@ public Schema select(String... names) {
* @return a projection schema from this schema, by name
*/
public Schema select(Collection<String> names) {
+ return select(names, true);
+ }
+
+ /**
+ * Creates a projection schema for a subset of columns, selected by name,
and with the specified case sensitivity.
+ * <p>
+ * Names that identify nested fields will select part or all of the field's
top-level column.
+ *
+ * @param names a List of String names for selected columns
+ * @return a projection schema from this schema, by name
+ */
+ public Schema select(Collection<String> names, boolean caseSensitive) {
Review comment:
I think it would be better to have separate methods. It is more clear what's
happening that way.
The schema case should match the table case. If the user requests a
case-insensitive projection, then it is fine if Iceberg chooses the case of the
result. Matching the table makes the most sense because it is a projection
selected by these names, not a projection created from the names.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]