Created
August 6, 2019 21:30
-
-
Save dbtsai/01a779e95e54f66f9e5d3f042700b45f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.spark.sql.sources.v2; | |
import org.apache.spark.annotation.Experimental; | |
import org.apache.spark.sql.catalog.v2.expressions.NamedReference; | |
@Experimental | |
public abstract class Filter { | |
/** | |
* Returns list of columns that are referenced by this filter. | |
*/ | |
abstract NamedReference[] references(); | |
protected NamedReference[] findReferences(Object valve) { | |
if (valve instanceof Filter) { | |
return ((Filter) valve).references(); | |
} else { | |
return new NamedReference[0]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment