Final Exam Question 2 - meaning of "field expression"

Just a quick query about this

Pipeline 2 is incorrect since $divide cannot operate over field expressions

To clarify, the term field expression equates to the $a, in pipeline 2, and shouldn’t say array? Also the “operate over”, I am really not sure what is mean by that.


The term “field expression” refers to “$a” in the pipeline 2. “Operate over field expressions” basically means if you can use “$a” as <expression1> (please note that the data type of "a" is not relevant in this particular statement).

{ $divide: [ <expression1>, <expression2> ] }

José Carlos


Thanks as always. I thought that was what it was, but a search for the term field expression in my notes didn’t turn anything up.

I do wonder if we could have less questions with double negatives in though :slight_smile:


The question

Pipeline 2 fails because the $divide operator only supports numeric types

Again, this question of context. Is the question is about the success or failure of the pipeline 2 or the requirements for a valid divide command.

So how can you tell if it fails or not, if you don’t know the data type of $a. If you ask the question

the $divide operator only supports numeric types

That is a different question, and I would like to see added to the end, “or valid expressions which resolve to a number.”

I had this issue with the ambiguity of questions on other courses, and given English is my first language, I have some sympathy, for those where is it is 2nd or 3rd.

1 Like


"a" is an array in this case ("a": [1, 34, 13]), so the question is just asking if you can pass an array to $divide as an argument.

José Carlos

Thank you :slight_smile:

Maybe worth highlighting that difference between the questions, since the first pipeline 2 question, the type of $a, wasn’t important, yet with the second pipeline 2 question, the type of $a is important.

I hope that makes sense.

You are welcome. Yes, it makes sense.