In fact both questions do address the same question what does that mean to "know" a function ? If you start from set-theoretical arguments a function is a graph that is a set $F$ (finite or not) of ordered pairs which is one-to-one i.e. if $\forall x$ there is at most only one pair $(x,y)$ in the graph with $x$ as the first coordinate. A function or a mapping is a the triple $(F,A,B)$ with $A$-set being the domain, i.e. the first projection of graph $F$, and $B$ any set larger than the range i.e. the second projection of graph $F$.
Knowing what a function is means knowing all the elements of the graph $F$ Either your data set covers all the graph F. Then you know exactly what is your function: this is $F=\{(x_n, f(x_n))\}$ in the finite case. Or this dataset corresponds to only sparsely sampled points picked up from the graph F, and such information is in general not sufficient to let you know what your function is unambiguously, unless some smoothness asumptions (e.g. $\mathcal C^0$,$\ldots$, $\mathcal C^\infty$) are formulated a priori about it. For example from Shannon's theory it is well known that if its Fourier transform has bounded support then the function can be recovered completely from an adequately sampled dataset (Shannon's sampling theorem). But in general you could imagine to fit the same discrete data set through interpolating polynomials of different orders or different families of polynomials, these polynomials being one-to-one once restricted to the support of your function.
All this discussion holds whether your consider $F$ as finite or non
finite set. Obviously knowing only one partial application of a
function of two variables, let say along $y=b$ is a cut made
through the graph $F=\{((x,y),f(x,y))\}$ along one direction of the domain and is not sufficient to recover all the elements of the graph.
For instance the function $f(x,y) = -x + y(|x| + 1)$ satisfies your constraints,
$f(0,y)=y$ $f(x,0)=-x$ $\lim_{y\rightarrow\infty} f(x,y)=+\infty$ $\lim_{y\rightarrow-\infty} f(x,y)=-\infty$ is continuous.
and differs from the one you propose.
Hope this helps.